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

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: Rebase, comments. Created 4 years, 6 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/dscache/support.go ('k') | filter/txnBuf/ds_txn.go » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: filter/featureBreaker/rds.go
diff --git a/filter/featureBreaker/rds.go b/filter/featureBreaker/rds.go
index 2bbbce7d445200f3659f8a164ba0222881fffbd3..4523fc297f0147108d2eff75b9fe3cb9426d3eed 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.NewKeyCB) error {
+ return r.run(func() error {
+ return r.rds.AllocateIDs(keys, cb)
})
- return start, err
}
func (r *dsState) DecodeCursor(s string) (ds.Cursor, error) {
@@ -70,7 +67,7 @@ func (r *dsState) GetMulti(keys []*ds.Key, meta ds.MultiMetaGetter, cb ds.GetMul
})
}
-func (r *dsState) PutMulti(keys []*ds.Key, vals []ds.PropertyMap, cb ds.PutMultiCB) error {
+func (r *dsState) PutMulti(keys []*ds.Key, vals []ds.PropertyMap, cb ds.NewKeyCB) error {
return r.run(func() (err error) {
return r.rds.PutMulti(keys, vals, cb)
})
« no previous file with comments | « filter/dscache/support.go ('k') | filter/txnBuf/ds_txn.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698