You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I noticed in the comments about prefix_extractor in options.h, it is mentioned:
This means — all keys with the same prefix must be in a contiguous group by comparator order.
In the LevelIterator::Seek(), I noticed the following logic:
The meaning of this code is that during PrefixSeek, it can be pre-determined whether it is necessary to actually enter the next file for seeking based on the prefix value of the first key in the next file.
In fact,it is based on the assumption that "all keys with the same prefix must be in a contiguous group by comparator order".
However, I believe using user_comparator_.CompareWithoutTimestamp() is an incorrect usage. To compare "same prefix", it is more appropriate to use Slice's own Compare. The user comparator is not responsible for comparing prefixes.
The text was updated successfully, but these errors were encountered:
I noticed in the comments about prefix_extractor in options.h, it is mentioned:
This means — all keys with the same prefix must be in a contiguous group by comparator order.
In the LevelIterator::Seek(), I noticed the following logic:
The meaning of this code is that during PrefixSeek, it can be pre-determined whether it is necessary to actually enter the next file for seeking based on the prefix value of the first key in the next file.
In fact,it is based on the assumption that "all keys with the same prefix must be in a contiguous group by comparator order".
However, I believe using user_comparator_.CompareWithoutTimestamp() is an incorrect usage. To compare "same prefix", it is more appropriate to use Slice's own Compare. The user comparator is not responsible for comparing prefixes.
The text was updated successfully, but these errors were encountered: