-
Notifications
You must be signed in to change notification settings - Fork 332
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
refactor(remote_wal): entry id usage #2986
Merged
Merged
Conversation
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
This reverts commit fcfcda2.
niebayes
requested review from
evenyag,
v0y4g3r,
WenyXu,
killme2008,
MichaelScofield and
waynexia
and removed request for
evenyag,
v0y4g3r and
WenyXu
December 23, 2023 16:29
niebayes
changed the title
refactor(: entry id usage
refactor(remote_wal): entry id usage
Dec 23, 2023
8 tasks
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## develop #2986 +/- ##
===========================================
- Coverage 85.87% 85.86% -0.01%
===========================================
Files 780 780
Lines 126184 126196 +12
===========================================
+ Hits 108356 108360 +4
- Misses 17828 17836 +8 |
WenyXu
reviewed
Dec 24, 2023
v0y4g3r
reviewed
Dec 24, 2023
evenyag
reviewed
Dec 25, 2023
v0y4g3r
approved these changes
Dec 25, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
evenyag
approved these changes
Dec 25, 2023
niebayes
added a commit
that referenced
this pull request
Dec 25, 2023
* chore: update comments for log store stuff * refactor: entry id usage * tmp update * Revert "tmp update" This reverts commit fcfcda2. * fix: resolve review conversations * fix: resolve review conversations * chore: remove entry offset
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.
I hereby agree to the terms of the GreptimeDB CLA
What's changed and what's your intention?
LogStore::append_batch
method return alast_entry_id
for each region. More specifically, it returns aHashMap<u64, EntryId>
where the key is a region id while the value is the id of the entry, the last entry of the entries belong to the region, written into the log store.KafkaLogStore
, the returned entry id for each region is the kafka offset of the last entry belong to the region that are written into the log store. During replay, the passed-in entry id is interpreted to a kafka offset and used to fetch log entries exactly starting from the offset.RaftEngineLogStore
, the returned entry id for each region is identical with the passed-in entry id. For example, an entry with idx
is appended to the log store. Then, the log store will returnx
for the region that the entry belong to.last_entry_id
returned from the log store will be used to update thenext_entry_id
of the associatedRegionWriteCtx
. More specifically,next_entry_id = last_entry_id + 1
.Checklist
Refer to a related PR or issue link (optional)