Repository navigation
feat(dup): write pegasus value in new data version for duplication - #459
Merged
Merged
Conversation
acelyc111
reviewed
Feb 5, 2020
levy5307
reviewed
Feb 6, 2020
levy5307
reviewed
Feb 6, 2020
levy5307
reviewed
Feb 6, 2020
| uint64_t local_timetag = | ||
| pegasus_extract_timetag(_pegasus_data_version, get_ctx.raw_value); | ||
|
|
||
| if (local_timetag >= new_timetag) { |
Contributor
There was a problem hiding this comment.
如果timestamp和cluster id相同,remove操作优先于put?
Contributor
Author
There was a problem hiding this comment.
热备份暂时不考虑 remove,remove 的一致性判断比较复杂
levy5307
reviewed
Feb 6, 2020
levy5307
reviewed
Feb 6, 2020
| int value_schema_version; | ||
|
|
||
| uint32_t expire_ts; | ||
| uint64_t timetag; |
Contributor
Author
There was a problem hiding this comment.
后面的PR会改,这个PR优先考虑让diff最小。
added 2 commits
February 6, 2020 17:16
hycdong
reviewed
Feb 7, 2020
hycdong
approved these changes
Feb 11, 2020
acelyc111
approved these changes
Feb 11, 2020
Closed
Closed
acelyc111
pushed a commit
to acelyc111/pegasus
that referenced
this pull request
Jun 10, 2020
acelyc111
pushed a commit
to acelyc111/pegasus
that referenced
this pull request
Jun 10, 2020
acelyc111
pushed a commit
that referenced
this pull request
Jun 11, 2020
acelyc111
pushed a commit
that referenced
this pull request
Jun 23, 2022
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What problem does this PR solve?
Duplication requires "timetag" to be encoded in value for "master-master" write-conflict resolution.
This PR introduces a read-before-write mechanism on every duplicated write.
What is changed and how it works?
For our read-before-write implementation, we read the record from RocksDB and decodes its timetag. If new timetag in duplicated write is larger than the old timetag, this duplicated write can be applied. Otherwise, the duplicate will be ignored.
Check List
Tests
Code changes
Side effects
Related changes