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
Group.RotateFile need call Flush() before rename. #2428
Comments
I create a test case to show this situation, 60 message will exceed the headBuf's size (which is 4096*10),and trigger the truncate, cause SearchForEndHeight failed to search height 50.
The modified version RotateFile will pass it.
|
@goolAdapter Thanks for reporting and investigating the issue, would be able to move your code and tests into a PR? That'd be highly appreciated. |
goolAdapter
added a commit
to goolAdapter/tendermint
that referenced
this issue
Sep 19, 2018
goolAdapter
added a commit
to goolAdapter/tendermint
that referenced
this issue
Sep 19, 2018
xla
pushed a commit
that referenced
this issue
Sep 25, 2018
* fix Group.RotateFile need call Flush() before rename. #2428 * fix some review issue. #2428 refactor Group's config: replace setting member with initial option * fix a handwriting mistake * fix a time window error between rename and write. * fix a syntax mistake. * change option name Get_ to With_ * fix review issue * fix review issue
Merged to develop. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Group.RotateFile need call Flush() before rename, Group.headBuf may have residual content, which may cause DataCorruptionError(WALDecoder presume whole message),and can't recovery from a crash.
The text was updated successfully, but these errors were encountered: