-
Notifications
You must be signed in to change notification settings - Fork 522
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
AssertionError in StoreAppender.checkWritePositionHeaderNumber() #611
Comments
|
I've attached a test case that reproduces this issue -- it fails about 8 times out of 10. Confirmed that this failure occurs in the latest chronicle-queue 5.17.14. |
A race window might exist between the following two lines in StoreAppender's resetPosition() method:
(The store.lastSequenceNumber() could have moved as a result of another party appending to the queue at the same time.) |
@mcs6502 do you mind pasting the test case here? I can't access the attachment for some reason... |
Sure thing -- here it is inline:
|
@mcs6502 thanks for this, I fixed the issue now. Basically you've hit a corner case - normally users don't use cycle(), especially on a new appender, and cycle() operation had a (undesired) side effect - it also initialized roll cycle for appender if it's unset. I removed this logic, as I don't think read access should mutate anything. |
Thanks for the quick fix, Dmitry! I've done a build of the current master and can confirm that the assertion error during cycle() is fixed.
Thanks! |
@mcs6502 The PretoucherTest is known to be flaky, so you can ignore it. Not sure about the other one, but can see that our CI builds are all passing including Windows and ARM. As to the side effect you described that's exactly the undesired behaviour. There shouldn't really be a way to create a queue file without any data in it - tailer should only pick up files when there's data. I checked that there's no code in the queue itself depending on this logic, so overall the behaviour now is more predictable and appropriate. Thanks for reporting and testing! PS just for our KYC - are you using Chronicle stuff commercially or for your own pet projects? And if commercially do you mind us asking who you work for? |
Released in Chronicle-Queue-5.17.15, BOM-2.17.279 |
I am having an assertion failure in StoreAppender's checkWritePositionHeaderNumber() method when the appender checks the position after having reset it.
The text was updated successfully, but these errors were encountered: