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

In replication scenario, entry_sm gets updated every time it is used. #728

Merged
merged 1 commit into from
Nov 26, 2024

Conversation

just-now
Copy link
Contributor

@just-now just-now commented Nov 25, 2024

It's not expected that the reference to the entry is taken in all places in the code. That's why every time it's accessed without taking a reference it's needed to save term and index of the entry to access it later through log_get_entry_sm().

@just-now just-now self-assigned this Nov 25, 2024
@just-now just-now added the Bug Confirmed to be a bug label Nov 25, 2024
Copy link

codecov bot commented Nov 25, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 81.15%. Comparing base (36eac86) to head (631183e).
Report is 2 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #728      +/-   ##
==========================================
+ Coverage   74.02%   81.15%   +7.13%     
==========================================
  Files         192      196       +4     
  Lines       27827    29563    +1736     
  Branches     2797     4090    +1293     
==========================================
+ Hits        20598    23993    +3395     
+ Misses       4906     3906    -1000     
+ Partials     2323     1664     -659     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@letFunny letFunny left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this Anatoliy, I just left a comment that hopefully makes the intent more clear and makes it harder for people to misuse it in the future.

src/raft/replication.c Show resolved Hide resolved
@just-now just-now force-pushed the fix-invalidate-entry-sm1 branch from 2059c9b to 631183e Compare November 26, 2024 12:47
@just-now just-now merged commit 7a37bdf into canonical:master Nov 26, 2024
13 checks passed
@just-now just-now deleted the fix-invalidate-entry-sm1 branch November 29, 2024 11:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Confirmed to be a bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants