Instead of completely disallowing MultiCfIterator when one or more child iterators will do manual prefix iteration (as suggested in #12770 ), just let MultiCfIterator operate as is even when there's a possibility of undefined result from child iterators. If one or more child iterators cause the heap to be empty, just return early and Valid() will return false.
It is still possible that heap is not empty when one or more child iterators are returning wrong keys. Basically, MultiCfIterator behaves the same as what we described in https://github.com/facebook/rocksdb/wiki/Prefix-Seek#manual-prefix-iterating - "RocksDB will not return error when it is misused and the iterating result will be undefined."
Summary
Instead of completely disallowing
MultiCfIterator
when one or more child iterators will do manual prefix iteration (as suggested in #12770 ), just letMultiCfIterator
operate as is even when there's a possibility of undefined result from child iterators. If one or more child iterators cause the heap to be empty, just return early andValid()
will return false.It is still possible that heap is not empty when one or more child iterators are returning wrong keys. Basically, MultiCfIterator behaves the same as what we described in https://github.com/facebook/rocksdb/wiki/Prefix-Seek#manual-prefix-iterating - "RocksDB will not return error when it is misused and the iterating result will be undefined."
Test Plan
MultiCfIterator added back to the stress test