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

Fix for the write error #97

Merged
merged 3 commits into from
Jun 21, 2023
Merged

Fix for the write error #97

merged 3 commits into from
Jun 21, 2023

Conversation

Scooletz
Copy link
Contributor

This PR focuses on fixing the overflow error 😭 . The data were written at the wrong page as the offset silently overflown in the MemoryMappedPageManager. Now, with a new property of DbAddress that does the calculation in one place this should not be the case.

Additionally, a few [DebuggerStepThrough] are added to help future battles.

One more thing is that AwaitWrites are properly awaited at the end of the writing loop!

@Scooletz Scooletz added the bug Something isn't working label Jun 21, 2023
@Scooletz Scooletz marked this pull request as ready for review June 21, 2023 14:35
Copy link
Contributor

@emlautarom1 emlautarom1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

As discussed, it would be nice to have checked arithmetic during debug builds to avoid this kind of bugs in the future.

@Scooletz
Copy link
Contributor Author

This is hidden as a property. Let me add one test for this then!

@github-actions
Copy link

Code Coverage

Package Line Rate Branch Rate Health
Paprika 88% 78%
Summary 88% (1607 / 1827) 78% (407 / 522)

Minimum allowed line rate is 75%

@Scooletz Scooletz merged commit c3abe1f into main Jun 21, 2023
@Scooletz Scooletz deleted the writing-fix branch June 21, 2023 15:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants