Repository navigation
Conversation
…d fails The cursor and keyset read paths of PaginatedEntitiesSource, PaginatedEntityTimeSeriesSource and PaginatedWebAnalyticEventDataSource built their reader IndexingError without submittedCount or failedCount. The Data Insights workflows unbox failedCount into updateStats(int, int), so a failed page read threw a NullPointerException inside the error handler. That NPE escaped DataInsightsApp.processWorkflow, which only catches SearchIndexException, and aborted the whole run with an unrelated stack trace instead of the reader error. Set both counts to the batch size, the records the read requested and lost. The search index PartitionWorker already falls back to the same number when the field is null, so its accounting does not change.
🚦 Removed from the merge queue —
|
The core DatePicker renders the neighbouring months' days as disabled cells, so matching on the day number alone hit two buttons (e.g. Sep 27 and Oct 27) and failed strict mode in the Inactive Announcement tests.
…endar date" This reverts commit 80d630b.
Code Review ✅ Approved🟡 Medium risk · Adds submitted and failed counts to paginated reader errors; inaccurate batch counts could overstate records lost in failure reports. Fixes the cursor and keyset read paths in VerificationRules No rules evaluated Functional validation Not enabledAuto-approval Not enabledFor more verification details, comment OptionsDisplay: compact → Showing compact verification results. Comment with these commands to change the behavior for this request:
Was this helpful? React with 👍 / 👎 | Powered by Gitar — free for open source |
Describe your changes:
Fixes #29245
A failed page read in Data Insights aborted the whole run with an unrelated
NullPointerExceptioninstead of reporting the reader failure.Cause. The cursor and keyset read paths of
PaginatedEntitiesSource,PaginatedEntityTimeSeriesSourceandPaginatedWebAnalyticEventDataSourcebuilt theirREADERIndexingErrorwithoutsubmittedCountorfailedCount. Only the offsetreadpath set them.DataAssetsWorkflow,CostAnalysisWorkflowandWebAnalyticsWorkflowall read throughreadNextKeysetand unboxgetFailedCount()intoupdateStats(int, int). So the null threw an NPE inside the error handler.DataInsightsApp.processWorkflowonly catchesSearchIndexException, so the NPE escaped to the catch-all instartApp. It skipped every later workflow and entity type, and the reader's own error report was lost.Fix. All six cursor/keyset catch blocks now set
submittedCountandfailedCounttobatchSize, the records the read requested and lost.successCountwas already0.PartitionWorker(search reindex) already falls back tocurrentBatchSizewhen the count is null. It builds each reader withlimit = currentBatchSize, so its numbers are unchanged.indexingError.json. A default of0would hide lost pages and changePartitionWorker, which treats null as "use the batch size".Not in this PR:
listAfterKeysetreturns a null cursor and the scan stops silentlyType of change:
High-level design:
N/A — small change: three readers, one line pair per catch block.
Tests:
Use cases covered
READER, submitted = failed = batch size, success = 0.updateStats(getSuccessCount(), getFailedCount())call, the line that threw, records the failure without an NPE.Unit tests
openmetadata-service/src/test/java/org/openmetadata/service/workflows/searchIndex/PaginatedSourceReadFailureTest.java: 4 tests, keyset and cursor forPaginatedEntitiesSourceandPaginatedEntityTimeSeriesSource.openmetadata-service/src/test/java/org/openmetadata/service/apps/bundles/insights/workflows/webAnalytics/sources/PaginatedWebAnalyticEventDataSourceReadFailureTest.java: 2 tests, keyset and cursor.IndexingErrorand replays the workflow'supdateStatscall.expected: <7> but was: <null>, and pass with it.PaginatedEntityTimeSeriesSourceStaleRelationshipTest,DataInsightsAppTestandPartitionWorkerTest: 47/47 passed.Backend integration tests
Local Java test run: PENDING. The planned run (5 unit classes, 90 IT classes across 7 lanes) has not run yet. It needs the local Docker host, which another branch's run is using. This PR stays a draft until the block reads PASSED; it will be filled by
make java_affected_run ARGS="--update-pr".Ingestion integration tests
Playwright (UI) tests
Manual testing performed
None beyond the tests above. Driving a reader into its catch block by hand means cutting the database connection partway through a Data Insights run. The unit tests reproduce that failure directly at the reader boundary.
UI screen recording:
Not applicable — backend-only fix; no UI code changes.
Checklist:
I have read the CONTRIBUTING document.
My PR title is
Fixes <issue-number>: <short explanation>My PR is linked to a GitHub issue via
Fixes #<issue-number>above.I have commented on my code, particularly in hard-to-understand areas. — Not applicable: the change follows the offset path's existing pattern.
For JSON Schema changes: I updated the migration scripts or explained why it is not needed. — Not applicable: no schema changes.
For a UI feature or feature task: … — Not applicable: backend-only.
I have added tests (unit / integration / Playwright as applicable) and listed them above.
Decision check — Not applicable: the count reported is the batch size, which matches the offset path and
PartitionWorker's existing fallback. No new contract, default or rule.I have added a test that covers the exact scenario we are fixing. For complex issues, comment the issue number in the test for future reference.
🤖 Generated with Claude Code