Fix race condition in async event consumers on rapid create-delete#26718
Fix race condition in async event consumers on rapid create-delete#26718
Conversation
cb31bf0 to
a1b7130
Compare
.../main/java/org/openmetadata/service/apps/bundles/changeEvent/feed/ActivityFeedPublisher.java
Show resolved
Hide resolved
OpenMetadata Service New-Code Coverage✅ PASS. Required changed-line coverage:
Only changed executable lines under |
🟡 Playwright Results — all passed (18 flaky)✅ 3112 passed · ❌ 0 failed · 🟡 18 flaky · ⏭️ 207 skipped
🟡 18 flaky test(s) (passed on retry)
How to debug locally# Download playwright-test-results-<shard> artifact and unzip
npx playwright show-trace path/to/trace.zip # view trace |
Code Review ✅ Approved 1 resolved / 1 findingsFixes race condition in async event consumers during rapid create-delete cycles by adding EntityNotFoundException safety handling with comprehensive test coverage. No issues found. ✅ 1 resolved✅ Quality: No test for ActivityFeedPublisher EntityNotFoundException handling
OptionsAuto-apply is off → Gitar will not commit updates to this branch. Comment with these commands to change:
Was this helpful? React with 👍 / 👎 | Gitar |
|
|
Changes have been cherry-picked to the 1.12.4 branch. |



Fixes #26690
Summary
WorkflowEventConsumer,ActivityFeedPublisher) throwEntityNotFoundExceptionbecause the entity is gone by the time they process the create eventEntityNotFoundExceptioncatch before the genericExceptioncatch insendMessage()of both consumers — the event is now skipped gracefully at DEBUG level with no failed event recordingTest plan
testSendMessage_SkipsGracefullyWhenEntityDeletedverifiesEntityNotFoundExceptiondoes not throwEventPublisherExceptionWorkflowEventConsumerTesttests pass