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

v1: Use TaskSendMessage() to send messages #62

Merged
merged 5 commits into from
Sep 22, 2023

Conversation

freeekanayaka
Copy link
Member

Convert the code to use the TaskSendMessage() helper to queue a RAFT_SEND_MESSAGE task, instead of calling out to the legacy raft_io->send() interface.

This makes the code enqueue a `struct raft_task` object instead of calling out
to the legacy `struct raft_io` interface.

Signed-off-by: Free Ekanayaka <free@ekanayaka.io>
This makes the code enqueue a `struct raft_task` object instead of calling out
to the legacy `struct raft_io` interface.

Signed-off-by: Free Ekanayaka <free@ekanayaka.io>
This commit covers the case in which the message is sent asynchronously after
entries have been persisted.

Signed-off-by: Free Ekanayaka <free@ekanayaka.io>
Signed-off-by: Free Ekanayaka <free@ekanayaka.io>
The sendAppendEntriesCb() raft_io->send() callback has been renamed to
replicationSendAppendEntriesDone(), which gets called when raft_step() handles
the completion of a RAFT_SEND_MESSAGE task for an AppendEntries message.

Signed-off-by: Free Ekanayaka <free@ekanayaka.io>
@codecov
Copy link

codecov bot commented Sep 22, 2023

Codecov Report

Patch coverage: 70.00% and project coverage change: +0.08% 🎉

Comparison is base (e0e7d14) 74.79% compared to head (02f3d83) 74.88%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #62      +/-   ##
==========================================
+ Coverage   74.79%   74.88%   +0.08%     
==========================================
  Files          53       53              
  Lines        9194     9142      -52     
  Branches     2296     2279      -17     
==========================================
- Hits         6877     6846      -31     
+ Misses       1017     1005      -12     
+ Partials     1300     1291       -9     
Files Changed Coverage Δ
src/election.c 79.85% <0.00%> (+0.54%) ⬆️
src/membership.c 74.21% <0.00%> (+0.11%) ⬆️
src/recv_append_entries.c 58.33% <0.00%> (-3.74%) ⬇️
src/recv_install_snapshot.c 38.09% <0.00%> (+5.40%) ⬆️
src/replication.c 67.91% <68.75%> (+0.49%) ⬆️
src/raft.c 79.89% <100.00%> (+0.46%) ⬆️

... and 1 file with indirect coverage changes

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

@freeekanayaka freeekanayaka merged commit 3649d62 into cowsql:main Sep 22, 2023
@freeekanayaka freeekanayaka deleted the task-send-message branch September 22, 2023 08:24
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.

1 participant