Skip to content

Conversation

@JacksonYao287
Copy link
Contributor

@JacksonYao287 JacksonYao287 commented Jan 7, 2026

expose nuraft_message to upper layer, so that they can register their own rpc call by calling bind_data_service_request

@JacksonYao287 JacksonYao287 force-pushed the add-interface-to-add-client-data-rpc branch 2 times, most recently from bf220c9 to b069b44 Compare January 8, 2026 00:54
// becoming a leader.

RD_LOGD(NO_TRACE_ID, "become_leader_cb: setting traffic_ready_lsn from {} to {}", current_gate, new_gate);
m_listener->on_become_leader(m_group_id);
Copy link
Contributor

Choose a reason for hiding this comment

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

Just curious about the purpose of on_become_xxx. Should we move it to the beginning of become_xxx_cb to call the upper callback first, similar to how handle_commit does?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

on_become_leader and on_become_follower will be used for homeobject scrubbing. when scrubbing is on-going, if leader switch happens, the old leader will become follower and thus on_become_follower will be called on this node, where we stop the scrubbing thread that will request scrub results from the other two members. one of the follower will become leader and thus on_become_leader will be called on this node, where we will read the scrub superblk and start the scrubbing thread to request scrub result from the other two memebers.

Should we move it to the beginning
no need to do this now, what we want is to make sure that we can be notified with the leader change event, it does not matter it is called in the beginning or end.

@xiaoxichen
Copy link
Collaborator

xiaoxichen commented Jan 8, 2026

Can we do a POC regarding the required communication primitives
I am not sure if it is right to break the HS/HO boundary here, or should we add a generic "USER" handler is good enough.

We can to the POC of HO in HS UT (which is easier to implement RepldevListener), that gives team better understanding the requirements

@JacksonYao287
Copy link
Contributor Author

I am now working on the POC code with this change to see if this is workable

@JacksonYao287 JacksonYao287 force-pushed the add-interface-to-add-client-data-rpc branch from b069b44 to 2ee228f Compare January 8, 2026 12:08
@codecov-commenter
Copy link

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

Codecov Report

❌ Patch coverage is 42.85714% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 49.05%. Comparing base (1a0cef8) to head (2ee228f).
⚠️ Report is 307 commits behind head on master.

Files with missing lines Patch % Lines
src/include/homestore/replication/repl_dev.h 50.00% 2 Missing ⚠️
src/lib/replication/repl_dev/raft_repl_dev.cpp 0.00% 2 Missing ⚠️
❗ Your organization needs to install the Codecov GitHub app to enable full functionality.
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #846      +/-   ##
==========================================
- Coverage   56.51%   49.05%   -7.46%     
==========================================
  Files         108      110       +2     
  Lines       10300    11468    +1168     
  Branches     1402     5430    +4028     
==========================================
- Hits         5821     5626     -195     
+ Misses       3894     2209    -1685     
- Partials      585     3633    +3048     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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