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 raw writer when batch size is too small #285

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

tmcgroul
Copy link
Contributor

No description provided.

@tmcgroul tmcgroul requested a review from eldargab May 20, 2024 10:28
@@ -444,4 +444,5 @@ function* pack<T>(items: T[], size: number): Iterable<T[]> {
}

items.splice(0, offset)
yield items
Copy link
Collaborator

Choose a reason for hiding this comment

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

This breaks the whole idea of committing the data in fixed sized chunks. This is crucial for reproducibility.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

but if we keep this code as it is then some chunks will not be complete.
recently i discovered that solana raw dataset had ~5 blocks gap. 2 dump isntances were running: one from a specific block and without --last-block and another with --last-block. so that one with --last-block instead of writing a final chunk from 5 blocks were finishing its process without writing anything at all.
and it happend only because the dumper restarted before this final chunk otherwise it still would be able to write this final chunk

Copy link
Collaborator

Choose a reason for hiding this comment

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

The bug is not here. It's just that, blocks left unwritten after the end of ingest loop, should be saved -

@tmcgroul tmcgroul requested a review from eldargab May 31, 2024 19:14
@belopash belopash force-pushed the master branch 2 times, most recently from cc23118 to 1f6a573 Compare July 23, 2024 08:58
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