Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(861)

Unified Diff: filter/count/rds.go

Issue 1844183003: Don't filter "Stop" error in raw interface. (Closed) Base URL: https://chromium.googlesource.com/external/github.com/luci/gae@master
Patch Set: Count filter doesn't count Stop as error. Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « filter/count/count_test.go ('k') | impl/memory/datastore_data.go » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: filter/count/rds.go
diff --git a/filter/count/rds.go b/filter/count/rds.go
index 6d933433d170456173cdf9254c8d8ea890f1b5a4..eeeccc520163d5eada3f771154617164c3df35da 100644
--- a/filter/count/rds.go
+++ b/filter/count/rds.go
@@ -5,6 +5,7 @@
package count
import (
+ "github.com/luci/luci-go/common/errors"
"golang.org/x/net/context"
ds "github.com/luci/gae/service/datastore"
@@ -41,7 +42,7 @@ func (r *dsCounter) DecodeCursor(s string) (ds.Cursor, error) {
}
func (r *dsCounter) Run(q *ds.FinalizedQuery, cb ds.RawRunCB) error {
- return r.c.Run.up(r.ds.Run(q, cb))
+ return r.c.Run.up(errors.Filter(r.ds.Run(q, cb), ds.Stop))
}
func (r *dsCounter) Count(q *ds.FinalizedQuery) (int64, error) {
@@ -54,15 +55,15 @@ func (r *dsCounter) RunInTransaction(f func(context.Context) error, opts *ds.Tra
}
func (r *dsCounter) DeleteMulti(keys []*ds.Key, cb ds.DeleteMultiCB) error {
- return r.c.DeleteMulti.up(r.ds.DeleteMulti(keys, cb))
+ return r.c.DeleteMulti.up(errors.Filter(r.ds.DeleteMulti(keys, cb), ds.Stop))
}
func (r *dsCounter) GetMulti(keys []*ds.Key, meta ds.MultiMetaGetter, cb ds.GetMultiCB) error {
- return r.c.GetMulti.up(r.ds.GetMulti(keys, meta, cb))
+ return r.c.GetMulti.up(errors.Filter(r.ds.GetMulti(keys, meta, cb), ds.Stop))
}
func (r *dsCounter) PutMulti(keys []*ds.Key, vals []ds.PropertyMap, cb ds.PutMultiCB) error {
- return r.c.PutMulti.up(r.ds.PutMulti(keys, vals, cb))
+ return r.c.PutMulti.up(errors.Filter(r.ds.PutMulti(keys, vals, cb), ds.Stop))
}
func (r *dsCounter) Testable() ds.Testable {
« no previous file with comments | « filter/count/count_test.go ('k') | impl/memory/datastore_data.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698