Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Two-node vfs2 unit test #674
Two-node vfs2 unit test #674
Changes from 1 commit
c0e8569
f2f3f83
f418816
b137aaf
64831fe
10ba5f0
be847c7
19f66d2
4ded6bb
0e3054d
993a673
bfb0815
2d80f98
2f42cfe
0a7cc12
b34e6f3
0820ad9
f4ff5a2
cc0ff2e
bc18c51
afa657e
8e1f5c9
67a49a5
6d21769
cf2690f
88a3131
7987e0d
6febc7b
7834e33
13fe315
ba61610
73b279d
4b3c238
6c2fdc9
dc3be92
05d9e91
8912b8e
97c9cb3
ffe06d7
7f20503
549bff9
43ec47c
70ef37e
ad7d864
f1adcb5
59c9036
6594fb8
d7490da
8b31e83
eff99ca
ad203cb
2d9fc07
e60109b
d924a06
f902cba
bfce72d
fde6dca
89f695b
aff5f3a
6c979b3
1381861
1583dd1
01f2f92
c296805
b3ca21c
2b2877b
64c3600
527881b
9ac2372
0bfc0d9
f515bef
fe47c99
3951d1e
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When can it happen that the size is not 0 but also it does not contain a header?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When the size of the file is greater than zero but less than the header size (32 bytes).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes how can we get to that state, is that a valid state at all?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wrote this having in mind that a WAL header write could result in only some of the bytes making it to disk---that was the motivation for treating a WAL with an incomplete header as though it were empty.
However, this is likely to be quite rare if it happens at all, since the header is only 32 bytes. Probably it would be better to just treat such a WAL as corrupt (since a short file could result from other things going wrong as well that we wouldn't want to ignore---hardware failure or a dqlite bug or etc).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Interestingly, SQLite itself will just ignore a WAL whose header is corrupt. I'm not sure if that policy makes sense in dqlite's case, we probably want to fail early instead because raft will be counting on certain data being present in the WALs. But we can relax this later if we decide that would be a good idea.