-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Crash replays all the value log files #1363
Comments
The issue seems to be happening because we update the I think we can update the head pointer as entries are being applied. diff --git a/db.go b/db.go
index 79b332d..dacd30f 100644
--- a/db.go
+++ b/db.go
@@ -136,6 +136,7 @@ func (db *DB) replayFunction() func(Entry, valuePointer) error {
} else {
nv = vp.Encode()
meta = meta | bitValuePointer
+ db.vhead = vp
}
v := y.ValueStruct{ |
Fixes #1363 The head pointer is not updated when we perform replays. The head pointer would be updated only when the replay completes. If badger crashes between the point when replay started and replay finished, we would end up replaying all the value log files. This PR fixes this issue.
Fixes #1363 The head pointer is not updated when we perform replays. The head pointer would be updated only when the replay completes. If badger crashes between the point when replay started and replay finished, we would end up replaying all the value log files. This PR fixes this issue. (cherry picked from commit 509de73)
Use Discuss Issues for reporting issues about this repository. |
Fixes #1363 The head pointer is not updated when we perform replays. The head pointer would be updated only when the replay completes. If badger crashes between the point when replay started and replay finished, we would end up replaying all the value log files. This PR fixes this issue. (cherry picked from commit 509de73)
Fixes #1363 The head pointer is not updated when we perform replays. The head pointer would be updated only when the replay completes. If badger crashes between the point when replay started and replay finished, we would end up replaying all the value log files. This PR fixes this issue. (cherry picked from commit 509de73) Co-authored-by: Ibrahim Jarif <[email protected]>
Fixes #1363 The head pointer is not updated when we perform replays. The head pointer would be updated only when the replay completes. If badger crashes between the point when replay started and replay finished, we would end up replaying all the value log files. This PR fixes this issue.
Fixes hypermodeinc/badger#1363 The head pointer is not updated when we perform replays. The head pointer would be updated only when the replay completes. If badger crashes between the point when replay started and replay finished, we would end up replaying all the value log files. This PR fixes this issue.
…nc#1506) Fixes hypermodeinc#1363 The head pointer is not updated when we perform replays. The head pointer would be updated only when the replay completes. If badger crashes between the point when replay started and replay finished, we would end up replaying all the value log files. This PR fixes this issue. (cherry picked from commit 509de73) Co-authored-by: Ibrahim Jarif <[email protected]>
What version of Badger are you using?
14386ac
Does this issue reproduce with the latest master?
Yes
Steps to Reproduce the issue
What Badger options were set?
What did you do?
Run benchmark write tool
What did you expect to see?
Value log replayed to replay only a few recent files
What did you see instead?
Badger is replaying file with id 0 offset 0, I have 1164 files
The text was updated successfully, but these errors were encountered: