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

[BREAKING] Switch Raft WAL to use simple files #6572

Merged
merged 52 commits into from
Sep 30, 2020
Merged
Changes from 1 commit
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
99f391b
Add comments to explain the ideas.
manishrjain Sep 22, 2020
18ef430
use file buffer to store wal metadata.
martinmr Sep 22, 2020
fc66d9d
Basic entry file.
martinmr Sep 23, 2020
973cb09
more changes.
martinmr Sep 24, 2020
cf933b7
more work
martinmr Sep 24, 2020
f7c8714
Meta file works. Entries doesn't
Sep 24, 2020
6b972ee
add a bunch of APIs
manishrjain Sep 24, 2020
6c21ede
allEntries function.
martinmr Sep 24, 2020
9b733b9
fix basic tests.
martinmr Sep 24, 2020
c8d7d98
revert to ristretto master.
martinmr Sep 24, 2020
cb0eaee
more changes.
martinmr Sep 24, 2020
4879cc4
Compiles
manishrjain Sep 24, 2020
9283489
test changes.
martinmr Sep 24, 2020
4307fcc
progress so far
manishrjain Sep 24, 2020
01e778d
All tests pass
manishrjain Sep 25, 2020
41cb58f
Make the codebase compile
manishrjain Sep 25, 2020
8d32b98
Merge branch 'master' into mrjn/raftwal
manishrjain Sep 25, 2020
34d4162
Tests pass again
manishrjain Sep 25, 2020
627b34a
Zero runs
manishrjain Sep 25, 2020
210a0a4
debug info
manishrjain Sep 25, 2020
ebf0668
changes
manishrjain Sep 25, 2020
e11cdf7
Fix TestBig test
Sep 25, 2020
533b2a3
remove some logs
manishrjain Sep 25, 2020
081c480
Running ok
manishrjain Sep 25, 2020
66d4dc7
This works
manishrjain Sep 25, 2020
64d9e47
use default raft
manishrjain Sep 25, 2020
db80528
Fix TestProposal
animesh2049 Sep 25, 2020
0b4a98e
feat(raftmigrate): Add tool to migrate from old raft format to new one
Sep 25, 2020
12d0bff
Only complain if we miss 5 ticks.
manishrjain Sep 25, 2020
9bf3d91
Copy over the byte slice to re.Data
manishrjain Sep 25, 2020
cd0faaf
Add some locks
manishrjain Sep 25, 2020
140379c
Store index separately
manishrjain Sep 25, 2020
15037f5
Merge branch 'ibrahim/mrjn/raftwal' into mrjn/raftwal
manishrjain Sep 25, 2020
2338df2
Divide up the code in two files
manishrjain Sep 25, 2020
bd1ada3
Print heartbeats in v2
manishrjain Sep 25, 2020
c676e40
Add raftID in migrate tool
Sep 25, 2020
14905d9
Dump raftID in debug tool
Sep 25, 2020
7055554
Fix glog error
Sep 25, 2020
6005bd2
Revert version upgrades for protobuf and gRPC.
danielmai Sep 25, 2020
0d91b71
Always return a lastindex >= snapshotindex
manishrjain Sep 25, 2020
feb7bef
Ensure that lastIndex is not less than SnapshotIndex
manishrjain Sep 25, 2020
bae8e64
fix(config): Set glog -v flag correctly from config files.
danielmai Sep 25, 2020
b0eaad5
Merge branch 'master' into mrjn/raftwal
manishrjain Sep 29, 2020
dcc7bbd
Fix up flags and such. Remove WAL flags. Create shared flags for Alph…
manishrjain Sep 29, 2020
c2b2321
Merge branch 'master' into mrjn/raftwal
martinmr Sep 29, 2020
0d4fb93
add comments and address review comments.
martinmr Sep 29, 2020
f05dc80
Flag parsing refactoring
manishrjain Sep 30, 2020
5f59055
Refactor Raft WAL code into multiple files.
manishrjain Sep 30, 2020
4c491c5
Make build work on Windows
manishrjain Sep 30, 2020
2f9cb9b
Fix a bug.
manishrjain Sep 30, 2020
ef1ea36
Final review
manishrjain Sep 30, 2020
eb80f35
Merge branch 'master' into mrjn/raftwal
manishrjain Sep 30, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix TestBig test
Ibrahim Jarif committed Sep 25, 2020

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
commit e11cdf7fbe8bf7bd4d548cbed478be503d6ea8b0
4 changes: 4 additions & 0 deletions raftwal/storage.go
Original file line number Diff line number Diff line change
@@ -465,6 +465,10 @@ func (ef *entryFile) Term(entryIndex uint64) uint64 {
// [0, maxNumEntries).
func (ef *entryFile) offsetGe(raftIndex uint64) int {
fi := ef.firstIndex()
// If first index is zero, this raftindex should be in a previous file.
if fi == 0 {
return -1
}
if raftIndex < fi {
return -1
}