We introduced a significant bug with
2cc7aee, when we fixed issue #11786.
Although that patch would fix the problem described in #11786, we
managed to not increment the iterator upon returning the current key.
This would have the iterator iterating over the same key, forever and
ever.
Signed-off-by: Joao Eduardo Luis <joao@suse.de>
(cherry picked from commit
70d31082fd3dc8c7857994104577f1a3631c678c)
for (; iter->valid(); iter->next()) {
pair<string,string> r = iter->raw_key();
- if (sync_prefixes.count(r.first) > 0)
+ if (sync_prefixes.count(r.first) > 0) {
+ iter->next();
return r;
+ }
}
return pair<string,string>();
}