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

Unified Diff: filter/featureBreaker/rds.go

Issue 1357343002: Add missing AllocateIDs API. (Closed) Base URL: https://github.com/luci/gae.git@master
Patch Set: add panic Created 5 years, 3 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/rds.go ('k') | impl/dummy/dummy.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 8a007869e5a10bed25d3a3d0dba10b691ec22311..2ff6c82231c8f71477cdb3719cdcf0feb508adda 100644
--- a/filter/featureBreaker/rds.go
+++ b/filter/featureBreaker/rds.go
@@ -16,6 +16,15 @@ 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
+ })
+ return start, err
+}
+
func (r *dsState) DecodeCursor(s string) (ds.Cursor, error) {
curs := ds.Cursor(nil)
err := r.run(func() (err error) {
« no previous file with comments | « filter/count/rds.go ('k') | impl/dummy/dummy.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698