Skip to content

fix: initialize time series before concurrent chunk writes - #310

Open
krowvin wants to merge 1 commit into
mainfrom
fix/concurrent-timeseries-store
Open

fix: initialize time series before concurrent chunk writes#310
krowvin wants to merge 1 commit into
mainfrom
fix/concurrent-timeseries-store

Conversation

@krowvin

@krowvin krowvin commented Sep 9, 2026

Copy link
Copy Markdown
Collaborator

Chunked writes to a new time series currently submit every chunk concurrently. The integration matrix on #309 exposed database errors during those writes against latest-dev, leaving partially stored data and causing the next readback test to fail too.

This change completes the first chunk before submitting the remaining chunks concurrently, so the series creation transaction can finish first. It also waits for and checks all multi-series futures, then raises an error naming every failed series instead of printing the errors and returning success. Successfully stored series are not rolled back. The existing integration assertions remain unchanged, and no retry policy or matrix exclusions were added.

Validation:

  • Added three regression tests covering creation ordering, stopping remaining writes after an initial failure, and reporting multiple failed series. All three failed before the change and pass afterward.
  • All 98 mock/doctest tests pass; strict mypy passes for 38 source files.
  • Black, isort, and whitespace checks pass.
  • Local integration validation is now complete; see the verified results below.

This is a separate fix from the Release Please migration in #309. Reviewers should note the intentional error-handling correction: callers of store_multi_timeseries_df now receive RuntimeError when one or more series cannot be stored, rather than silent partial success.

Verified backend results

At commit 8159b4f:

  • All 18 integration matrix jobs passed: Python 3.9/3.13, three CDA versions, and latest-dev / 26.02.17 / 26.07.16-RC02 schemas. Successful run.
  • Local Windows/Python 3.13.2: all 178 mock/doctest/integration tests passed against latest-dev with CDA 2026.08.31-testd, and again with CDA 2026.05.12-i.
  • The two affected chunk-write/readback tests passed in three local repeats with this fix. The intermittent original failure did not reproduce in three fresh-process baseline repeats; the regression tests and previously failing CI combinations provide the before/after evidence.
  • The installed database source confirms line 2459 raises "Unable to generate timeseries_code". No database release change was needed.
  • Local setup used

@krowvin
krowvin requested a review from Enovotny September 9, 2026 01:04
@sonarqubecloud

sonarqubecloud Bot commented Sep 9, 2026

Copy link
Copy Markdown

@krowvin
krowvin requested a review from msweier September 9, 2026 01:06
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