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

Unified Diff: filter/featureBreaker/rds.go

Issue 2007123002: datastore: Update AllocateIDs to take keys. (Closed) Base URL: https://chromium.googlesource.com/external/github.com/luci/gae@master
Patch Set: Add empty arg/key short-circuits for other varidic methods. Created 4 years, 7 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
Index: filter/featureBreaker/rds.go
diff --git a/filter/featureBreaker/rds.go b/filter/featureBreaker/rds.go
index ee7829e4cdfde230b3f0d306d4feae2893dc4a27..4f5fb3ecac4e56799cc7649e27bce7d6709bf549 100644
--- a/filter/featureBreaker/rds.go
+++ b/filter/featureBreaker/rds.go
@@ -16,13 +16,10 @@ type dsState struct {
rds ds.RawInterface
}
-func (r *dsState) AllocateIDs(incomplete *ds.Key, n int) (int64, error) {
- start := int64(0)
- err := r.run(func() (err error) {
- start, err = r.rds.AllocateIDs(incomplete, n)
- return
+func (r *dsState) AllocateIDs(keys []*ds.Key, cb ds.PutMultiCB) error {
+ return r.run(func() error {
+ return r.rds.AllocateIDs(keys, cb)
})
- return start, err
}
func (r *dsState) DecodeCursor(s string) (ds.Cursor, error) {
« no previous file with comments | « filter/count/rds.go ('k') | filter/txnBuf/ds_txn.go » ('j') | impl/memory/datastore_data.go » ('J')

Powered by Google App Engine
This is Rietveld 408576698