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

Remove req from lsn map when committing. #496

Merged
merged 3 commits into from
Aug 15, 2024
Merged

Conversation

xiaoxichen
Copy link
Collaborator

No description provided.

sanebay
sanebay previously approved these changes Aug 14, 2024
@sanebay
Copy link
Contributor

sanebay commented Aug 14, 2024

Did your test shows memory usage not increasing via grafana ? Whats the current usage ?

@xiaoxichen
Copy link
Collaborator Author

yes the homestore long running UT shows stable memory usage. Will continue to check on SM level.

@@ -758,6 +758,8 @@ void RaftReplDev::handle_commit(repl_req_ptr_t rreq, bool recovery) {

// Remove the request from repl_key map.
m_repl_key_req_map.erase(rreq->rkey());
// Remove the request from lsn map.
m_state_machine->unlink_lsn_to_req(rreq->lsn());
Copy link
Contributor

Choose a reason for hiding this comment

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

if we do this , we will lose the entry cache in leader.
what`s the problem if remove this.

if (rreq->is_proposer()) {

can the reqs in the leader be removed as those in follower when they are expired?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

this is not used anywhere except in end_of_append_batch ATM.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I think the entry cache is separated into two part - log and data.
Log is on logstore, as discussed in your logstore PR if the cache you add can be extend and cache last N records, regardless of flush.

Data is on the path of RaftReplDev::on_fetch_data_received, right now it just read from drive based on blkid. As #414 stated this approach is wrong after we introduce GC. If the fetch need to go through Index it goes through HO, I think we may have a unified cache in HO which can serve customer IO as well.

@codecov-commenter
Copy link

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

Attention: Patch coverage is 0% with 3 lines in your changes missing coverage. Please review.

Project coverage is 56.58%. Comparing base (1a0cef8) to head (29d5bda).
Report is 40 commits behind head on master.

Files Patch % Lines
src/lib/replication/service/raft_repl_service.cpp 0.00% 2 Missing ⚠️
src/lib/replication/repl_dev/raft_repl_dev.cpp 0.00% 1 Missing ⚠️

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #496      +/-   ##
==========================================
+ Coverage   56.51%   56.58%   +0.07%     
==========================================
  Files         108      109       +1     
  Lines       10300    10515     +215     
  Branches     1402     1428      +26     
==========================================
+ Hits         5821     5950     +129     
- Misses       3894     3961      +67     
- Partials      585      604      +19     

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

@xiaoxichen xiaoxichen merged commit 13a2def into eBay:master Aug 15, 2024
21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants