Skip to content

fix(storage): preserve zero-row batches and concurrent lazy flushes - #550

Open
rikkurea-boop wants to merge 7 commits into
OpenDCAI:mainfrom
rikkurea-boop:publish/p07-04-batched-storage-zero-row
Open

rikkurea-boop wants to merge 7 commits into
OpenDCAI:mainfrom
rikkurea-boop:publish/p07-04-batched-storage-zero-row

Conversation

@rikkurea-boop

@rikkurea-boop rikkurea-boop commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

Summary

This PR combines #549 and #550 into one storage fix for easier review.

It addresses two issues:

  • Empty batches: Prevent errors when a batch produces no records, including CSV edge cases.
  • Concurrent writes: Prevent newer data from being lost or overwritten when storage flushes overlap with writes or other flushes.

Changes

  • Handle empty batches safely while preserving CSV headers.
  • Protect newer writes during background flushes.
  • Prevent older flushes from overwriting newer data.
  • Add regression tests for both issues.

Testing

  • All 6 CI checks passed on Ubuntu and Windows.
  • 178 tests passed, 1 skipped.
  • Additional regression tests confirmed both fixes.

The changes are limited to the storage module and its tests.

rikkurea-boop added a commit to rikkurea-boop/DataFlow that referenced this pull request Oct 13, 2026
Compose OpenDCAI#550 with upstream main that already includes OpenDCAI#551. Integration candidate; needs current-head test and Manager review.
rikkurea-boop added a commit to rikkurea-boop/DataFlow that referenced this pull request Oct 13, 2026
… storage PR

Preserve existing OpenDCAI#550 commits and test coverage while integrating
upstream OpenDCAI#551 batched output cache invalidation.
Integrate original generation check and regression test on top of OpenDCAI#550 for independent concurrency validation.
Guard flush_step persistence across concurrent flush calls so an older
snapshot cannot overwrite a newer committed generation. Preserve writes
during flush and add deterministic JSONL/CSV regression coverage.
@rikkurea-boop rikkurea-boop changed the title fix(storage): preserve zero-row batched list datasets fix(storage): preserve zero-row batches and concurrent lazy flushes Oct 13, 2026
rikkurea-boop added a commit to rikkurea-boop/DataFlow that referenced this pull request Oct 13, 2026
rikkurea-boop added a commit to rikkurea-boop/DataFlow that referenced this pull request Oct 13, 2026
rikkurea-boop added a commit to rikkurea-boop/DataFlow that referenced this pull request Oct 13, 2026

This branch has not been deployed

No deployments
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.

1 participant