Skip to content

Fix ReadFull must read PAGE_SIZE bytes [{0}] - #2717

Merged
JKamsker merged 3 commits into
litedb-org:devfrom
isbdnt1:dev
Oct 28, 2025
Merged

JKamsker merged 3 commits into
litedb-org:devfrom
isbdnt1:dev

Conversation

@isbdnt1

@isbdnt1 isbdnt1 commented Oct 25, 2025

Copy link
Copy Markdown
Contributor

No description provided.

@isbdnt1

isbdnt1 commented Oct 25, 2025

Copy link
Copy Markdown
Contributor Author

#2523

@JKamsker

Copy link
Copy Markdown
Collaborator

Can you provide tests which prove that you fix did fix it?

@isbdnt1

isbdnt1 commented Oct 26, 2025

Copy link
Copy Markdown
Contributor Author

Can you provide tests which prove that you fix did fix it?

I'm not sure how to provide tests. This is an occasional bug. The trigger reason is that failing to flush immediately after WriteStream causes ReadStream to not read the latest Page.

image

@isbdnt1

isbdnt1 commented Oct 26, 2025

Copy link
Copy Markdown
Contributor Author

WriteStream at
image

ReadStream at
image

@isbdnt1

isbdnt1 commented Oct 26, 2025

Copy link
Copy Markdown
Contributor Author

When the bug occurs, bytesRead is zero.
image

@JKamsker

Copy link
Copy Markdown
Collaborator

Even tho we can't consistently reproduce the issue out in the wild, i was able to craft a regression test which drips when your fix is not in place. Thank you for your contribution!

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 this pull request may close these issues.

2 participants