Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BackwardFetchFeed not working as expected #1

Open
yinhm opened this issue Apr 11, 2015 · 0 comments
Open

BackwardFetchFeed not working as expected #1

yinhm opened this issue Apr 11, 2015 · 0 comments
Labels

Comments

@yinhm
Copy link
Owner

yinhm commented Apr 11, 2015

rocksdb default to prefixed seek:

The docs[2] says: "If there is one or more keys in the database matching prefix of lookup_key, RocksDB will place the iterator to the key equal or larger than lookup_key of the same prefix, as for total ordering mode."

So we manually place a fixed max key for each use entry index:

       MaxFlakeId = flake.Id{
               0xFF, 0xFF, 0xFF, 0xFF,
               0xFF, 0xFF, 0xFF, 0xFF,
               0xFF, 0xFF, 0xFF, 0xFF,
               0xFF, 0xFF, 0xFF, 0xFF,
       }

Unfortunately this does not work as expected, so we build another Index: TableReverseEntryIndex, which just use a fixed MaxFlakeTime subtract current time as reversed time. Then use forward seek, this does work.

Remove TableEntryIndex and BackwardFetchFeed until this resolved.

Refs issues : tecbot/gorocksdb#24 facebook/rocksdb#548

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant