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

Acquiring next byte store may not change the state when shifting backwards #452

Closed
glukos opened this issue Sep 29, 2022 · 2 comments · Fixed by #453
Closed

Acquiring next byte store may not change the state when shifting backwards #452

glukos opened this issue Sep 29, 2022 · 2 comments · Fixed by #453
Assignees

Comments

@glukos
Copy link
Contributor

glukos commented Sep 29, 2022

        if (adding > 0 && !bytesStore.inside(offset, checkSize0(adding - 1))) {
            acquireNextByteStore0(offset + adding - 1, false);

The logic above fails when bytesStore.start() is greater than offset, but the difference between start and offset is less than adding.
Real-life example is overwriting the header after we wrote a message.

@hft-team-city
Copy link
Collaborator

Released in Chronicle-Bytes-2.23.32, BOM-2.23.127

@hft-team-city
Copy link
Collaborator

Released in Chronicle-Bytes-2.22.28, BOM-2.22.162

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants