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

Unified Diff: impl/memory/gkvlite_iter.go

Issue 1309803004: Add transaction buffer filter. (Closed) Base URL: https://github.com/luci/gae.git@add_query_support
Patch Set: make data flow clearer, implement Count 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
Index: impl/memory/gkvlite_iter.go
diff --git a/impl/memory/gkvlite_iter.go b/impl/memory/gkvlite_iter.go
index f75ca02d248d2d965e31e37192912ee18b1ceda9..2d2419c26db0659a10a83a66865cad65231ba321 100644
--- a/impl/memory/gkvlite_iter.go
+++ b/impl/memory/gkvlite_iter.go
@@ -65,7 +65,8 @@ func multiIterate(defs []*iterDefinition, cb func(suffix []byte) bool) {
}
def := defs[idx]
- it.next(serialize.Join(def.prefix, suffix), func(itm *gkvlite.Item) {
+ pfxLen := prefixLens[idx]
+ it.next(serialize.Join(def.prefix[:pfxLen], suffix), func(itm *gkvlite.Item) {
iannucci 2015/09/29 04:43:27 This bug happens when using builtin indexes for qu
if itm == nil {
// we hit the end of an iterator, we're now done with the whole
// query.
@@ -73,7 +74,7 @@ func multiIterate(defs []*iterDefinition, cb func(suffix []byte) bool) {
return
}
- sfxRO := itm.Key[prefixLens[idx]:]
+ sfxRO := itm.Key[pfxLen:]
if bytes.Compare(sfxRO, suffix) > 0 {
// this row has a higher suffix than anything we've seen before. Set

Powered by Google App Engine
This is Rietveld 408576698