eventstore: fix lmdb and mmm ptag-kind queries.
the prefix was missing the 2 bytes of the kind when preparing the query. we also simplify the query planner logic a little bit and eliminate some useless fields and everything is clearer.
This commit is contained in:
@@ -45,7 +45,7 @@ func (it *iterator) pull(n int, since uint32) {
|
||||
return
|
||||
}
|
||||
|
||||
if len(it.key) != query.keySize || !bytes.HasPrefix(it.key, query.prefix) {
|
||||
if len(it.key) != len(query.prefix)+4 || !bytes.HasPrefix(it.key, query.prefix) {
|
||||
// we reached the end of this prefix
|
||||
it.exhausted = true
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user