-
Notifications
You must be signed in to change notification settings - Fork 6.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix rowcache get returning incorrect timestamp (#11952)
Summary: Fixes #7930. When there is a timestamp associated with stored records, get from row cache will return the timestamp provided in query instead of the timestamp associated with the stored record. ## Cause of error: Currently a row_handle is fetched using row_cache_key(contains a timestamp provided by user query) and the row_handle itself does not persist timestamp associated with the object. Hence the [GetContext::SaveValue() ](https://github.com/facebook/rocksdb/blob/6e3429b8a6a53d5e477074057b5f27218063b5f2/table/get_context.cc#L257) function will fetch the timestamp in row_cache_key and may return the incorrect timestamp value. ## Proposed Solution If current cf enables ts, append a timestamp associated with stored records after the value in replay_log (equivalently the value of row cache entry). When read, `replayGetContextLog()` will update parsed_key with the correct timestamp. Pull Request resolved: #11952 Reviewed By: ajkr Differential Revision: D51501176 Pulled By: jowlyzhang fbshipit-source-id: 808fc943a8ae95de56ae0e82ec59a2573a031f28
- Loading branch information
1 parent
ddb7df1
commit 324453e
Showing
3 changed files
with
224 additions
and
80 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.