| Index: appengine/datastorecache/manager.go
|
| diff --git a/appengine/datastorecache/manager.go b/appengine/datastorecache/manager.go
|
| index db6d79c7c642116034c255b9c465792b9ede2b1c..da801bd328659a6d7072901adfd43a90e83e4d2b 100644
|
| --- a/appengine/datastorecache/manager.go
|
| +++ b/appengine/datastorecache/manager.go
|
| @@ -19,7 +19,6 @@ import (
|
| "github.com/luci/luci-go/common/sync/parallel"
|
| "github.com/luci/luci-go/server/router"
|
|
|
| - "github.com/luci/gae/filter/dsQueryBatch"
|
| "github.com/luci/gae/service/datastore"
|
| "github.com/luci/gae/service/info"
|
|
|
| @@ -27,12 +26,6 @@ import (
|
| "golang.org/x/net/context"
|
| )
|
|
|
| -const (
|
| - // managerQueryBatchSize is the query batch size for cache entries that are
|
| - // processed by a manager shard.
|
| - managerQueryBatchSize = 200
|
| -)
|
| -
|
| func errHTTPHandler(fn func(c context.Context, req *http.Request, params httprouter.Params) error) router.Handler {
|
| return func(ctx *router.Context) {
|
| err := fn(ctx.Context, ctx.Request, ctx.Params)
|
| @@ -326,7 +319,11 @@ func (ms *managerShard) runLocked(c context.Context) error {
|
| return nil
|
| }
|
|
|
| - err := datastore.Run(dsQueryBatch.BatchQueries(c, int32(ms.queryBatchSize), handleEntries), q, func(e *entry) error {
|
| + b := datastore.Batcher{
|
| + Size: ms.queryBatchSize,
|
| + Callback: handleEntries,
|
| + }
|
| + err := b.Run(c, q, func(e *entry) error {
|
| totalEntries++
|
| ms.observeEntry()
|
| entries = append(entries, e)
|
|
|