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

MemoryLogRecordsArrowBuilder resetWriterState can cause batch data loss #353

Closed
2 tasks done
swuferhong opened this issue Feb 7, 2025 · 1 comment · Fixed by #354
Closed
2 tasks done

MemoryLogRecordsArrowBuilder resetWriterState can cause batch data loss #353

swuferhong opened this issue Feb 7, 2025 · 1 comment · Fixed by #354
Assignees
Milestone

Comments

@swuferhong
Copy link
Collaborator

Search before asking

  • I searched in the issues and found nothing similar.

Fluss version

main (development)

Please describe the bug 🐞

When MemoryLogRecordsArrowBuilder try to resetWriterState in case the produceLog request failed and the batch is re-enqueue to send with different write state, we will reset the bytesView to null, this is very dangerous. Because once we set bytesView to null, we won't be able to retrieve the data from arrowWriter while next build, which means data in this batch will be lost. The correct approach is to simply reset the batch header instead of reset the whole batch.

Solution

No response

Are you willing to submit a PR?

  • I'm willing to submit a PR!
@wuchong
Copy link
Member

wuchong commented Feb 7, 2025

fixed in #354

@wuchong wuchong closed this as completed Feb 7, 2025
@wuchong wuchong added this to the v0.6 milestone Feb 7, 2025
@swuferhong swuferhong changed the title MemoryLogRecordsArrowBuilder resetWriterState will cause can cause batch data loss MemoryLogRecordsArrowBuilder resetWriterState can cause batch data loss Feb 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants