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

Add local_data and is_local to raft_entry #639

Merged
merged 2 commits into from
May 23, 2024

Conversation

cole-miller
Copy link
Contributor

@cole-miller cole-miller commented Apr 23, 2024

The local_data field stores data that is persisted locally (and stored in the in-memory log) but not send in AppendEntries messages. This will be used to store the vfs2_wal_slice when we introduce vfs2.

The is_local field is not persisted nor sent in AppendEntries. It exists only in the in-memory log and is true when the entry in question originated on the current node when it was leader, as opposed to being loaded from disk or received in AppendEntries. This will be used during vfs2 integration to determine whether to use vfs2_unhide or vfs2_commit when a COMMAND entry is applied.

Signed-off-by: Cole Miller [email protected]

@cole-miller
Copy link
Contributor Author

cole-miller commented Apr 23, 2024

This change breaks compatibility with all extant libraft releases, so as part of the same PR we need to disable the "external libraft" CI job and remove the option from the build system bits of it will need to be guarded by DQLITE_NEXT.

@cole-miller
Copy link
Contributor Author

Marking as draft while I resolve the reports from ASan (which I wasn't seeing locally...)

@cole-miller cole-miller marked this pull request as draft April 23, 2024 13:48
@cole-miller
Copy link
Contributor Author

Failing tests on Jammy are due to microsoft/linux-package-repositories#130.

Copy link

codecov bot commented Apr 24, 2024

Codecov Report

Attention: Patch coverage is 89.18919% with 8 lines in your changes are missing coverage. Please review.

Project coverage is 77.43%. Comparing base (cb65db7) to head (960b9e2).
Report is 5 commits behind head on master.

Files Patch % Lines
src/raft/uv_encoding.c 81.48% 2 Missing and 3 partials ⚠️
src/raft/uv_segment.c 84.21% 1 Missing and 2 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #639      +/-   ##
==========================================
- Coverage   80.57%   77.43%   -3.14%     
==========================================
  Files         196      196              
  Lines       28301    27262    -1039     
  Branches     5300     5476     +176     
==========================================
- Hits        22803    21110    -1693     
- Misses       3767     4355     +588     
- Partials     1731     1797      +66     

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

@cole-miller cole-miller marked this pull request as ready for review April 24, 2024 09:27
@cole-miller cole-miller requested a review from just-now April 24, 2024 09:27
@cole-miller
Copy link
Contributor Author

Marking this as draft until #642 merges and it can be retargeted to master

@cole-miller cole-miller marked this pull request as draft April 24, 2024 13:38
@cole-miller cole-miller force-pushed the local-buf branch 3 times, most recently from d80c8ca to 55f4ab1 Compare April 25, 2024 15:01
@cole-miller cole-miller changed the base branch from dqlite-next to master April 25, 2024 15:02
@cole-miller cole-miller force-pushed the local-buf branch 3 times, most recently from 2df9c4c to 44dbf91 Compare April 29, 2024 23:07
@cole-miller cole-miller changed the title Add local_buf and is_local to raft_entry Add local_data and is_local to raft_entry Apr 29, 2024
@cole-miller cole-miller force-pushed the local-buf branch 2 times, most recently from e73e93e to cca8090 Compare April 29, 2024 23:50
Copy link
Contributor

@just-now just-now left a comment

Choose a reason for hiding this comment

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

+1

These members support use-cases for the new disk VFS.

Signed-off-by: Cole Miller <[email protected]>
@cole-miller cole-miller marked this pull request as ready for review May 22, 2024 12:10
Signed-off-by: Cole Miller <[email protected]>
@cole-miller cole-miller merged commit 9eb8b1d into canonical:master May 23, 2024
11 of 13 checks passed
@cole-miller cole-miller mentioned this pull request Jun 25, 2024
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.

2 participants