Skip to content

Fix time-series requests with explicit response units - #1902

Open
krowvin wants to merge 1 commit into
developfrom
fix/1901-timeseries-response-units
Open

Fix time-series requests with explicit response units#1902
krowvin wants to merge 1 commit into
developfrom
fix/1901-timeseries-response-units

Conversation

@krowvin

@krowvin krowvin commented Aug 26, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • replace explicit-unit validation that scanned the unbounded AV_TSV_DQU data view with native-to-response unit convertibility validation
  • preserve the existing invalid-unit response contract
  • add direct-read parity coverage for converted response units

The prior validation issued up to two existence queries against all historical rows for a time series without applying the requested begin/end range. For long-lived series, Oracle could spend the full CDA request timeout validating the unit before executing the bounded data query.

Related Issue

Closes #1901

Validation

  • :cwms-data-api:compileJava, compileTestJava, checkstyleMain, and checkstyleTest
  • TimeSeriesDirectReadParityIT.convertedUnitReadMatchesRetrieveTs against latest-dev Oracle
  • TimeseriesControllerTestIT.test_wrong_units against latest-dev Oracle
  • broad gradlew build: 734 tests passed, 37 skipped; 9 unrelated Mockito tests failed because the local Java 21 runtime is newer than the repository's pinned Byte Buddy support (Java 19)

The exact reported two-day payload did not time out against the latest-dev Oracle 23.5 test database. Database schema comparison found the relevant view definition unchanged across recent CWMS database releases; optimizer version, statistics, and historical row volume can explain why the deployed MVP database exhibits the timeout.

Checklist

  • AI tools used

Signed-off-by: Charles Graham, SWT <charles.r.graham@usace.army.mil>
@krowvin

krowvin commented Aug 26, 2026

Copy link
Copy Markdown
Collaborator Author

Job failure are due to power outage. HEC Nexus is down.

@MikeNeilson MikeNeilson left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Seems like a reasonable change.

@krowvin
krowvin marked this pull request as ready for review August 27, 2026 17:52
@krowvin
krowvin requested a review from MikeNeilson August 27, 2026 17:52
@krowvin

krowvin commented Aug 27, 2026

Copy link
Copy Markdown
Collaborator Author

I had drafted while I waited on the HEC box to come back. If you approve I'll go ahead and merge it in.

Unless you're wanting to give it a minute for others to see?

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.

[Bug]: Timeseries request times out when unit(s) parameter specified

2 participants