-
Notifications
You must be signed in to change notification settings - Fork 138
replication: Try to reinstate entries that have been truncated away #483
Conversation
please test downstream |
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## master #483 +/- ##
==========================================
+ Coverage 76.84% 77.22% +0.37%
==========================================
Files 51 51
Lines 9748 9792 +44
Branches 2501 2504 +3
==========================================
+ Hits 7491 7562 +71
+ Misses 1075 1052 -23
+ Partials 1182 1178 -4 ☔ View full report in Codecov by Sentry. |
c1a1d74
to
66a2a3e
Compare
please test downstream |
66a2a3e
to
b676bb5
Compare
please test downstream |
Test results look encouraging! |
please test downstream |
b676bb5
to
daf5883
Compare
please test downstream |
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
9926312
to
365b640
Compare
Fixes #470. To sum up: libraft's in-memory log implementation can only track a single log entry for each (index, term) pair. We also need to keep log entries around as long as they're referenced by an The fix is to have the original leader notice in this situation that the entry it's just received is already tracked by the in-memory log, and just increment the refcount of that existing entry. |
365b640
to
29ed0a2
Compare
FWIW, if it could serve as inspiration I've worked around this issue with this approach cowsql/raft#101. Probably not ideal, but good enough for getting rid of the bug and the assertion failure (I'm planning a broader fix later). |
29ed0a2
to
a417354
Compare
Signed-off-by: Cole Miller <[email protected]>
Signed-off-by: Cole Miller <[email protected]>
a417354
to
050ee00
Compare
1b41a11
to
10f4f6f
Compare
Signed-off-by: Cole Miller <[email protected]>
Signed-off-by: Cole Miller <[email protected]>
Signed-off-by: Cole Miller <[email protected]>
Signed-off-by: Cole Miller <[email protected]>
10f4f6f
to
0cd0265
Compare
Experiment with fixing #470