dbi 604 handle replication slot creation getting stuck#4439
Conversation
masterashu
commented
Jun 17, 2026
- Handle status terminating during resync-drop-flow.
- Add user facing logs for waiting replication slot creation warning.
- Streaming replication protocol doesn't support timeouts, so best we can do is user warning
Code reviewNo issues found. Checked for bugs and CLAUDE.md compliance. |
1 similar comment
Code reviewNo issues found. Checked for bugs and CLAUDE.md compliance. |
🔄 Flaky Test DetectedAnalysis: The actual e2e tests passed; failures are isolated to the "Ingest tests results for analysis" CI infrastructure step, where the analytics ClickHouse endpoint returned HTTP 500 "Timeout error" — a network/infra issue, not a code bug. ✅ Automatically retrying the workflow |
🔄 Flaky Test DetectedAnalysis: The actual test step passed; only the "Ingest tests results for analysis" telemetry step failed because the stresshouse ClickHouse metrics instance rejected the upload with a "Too many simultaneous queries (1007/1000)" rate-limit error after exhausting retries — an infrastructure issue, not a code bug. ✅ Automatically retrying the workflow |
🔄 Flaky Test DetectedAnalysis: The actual tests passed; the only failure is the CI "Ingest tests results for analysis" step hitting repeated HTTP 500 "Timeout error" responses from the external analytics-upload endpoint, an infrastructure/network issue unrelated to the test code. ✅ Automatically retrying the workflow |
❌ 1 Tests Failed:
View the full list of 1 ❄️ flaky test(s)
To view more test analytics, go to the Test Analytics Dashboard |
❌ Test FailureAnalysis: The new TestApiMongo/TestDropRunningFlow fails deterministically with an "unsupported operation" error at drop_flow_test.go:18 across multiple matrix configs, indicating a real bug in the PR's new drop-flow code path (no timeout/race/network/intermittent characteristics). |
|
|
||
| logger.Info("waiting for slot to be created...") | ||
| slotCreateStart := time.Now() | ||
| stopSlotCreateWarning := common.Interval(ctx, 5*time.Minute, func() { |
There was a problem hiding this comment.
Let's move this into postgres connector. We've only seen the problem there and the logged advice only applies there
| } | ||
|
|
||
| if input.Resync { | ||
| if input.Resync && activeSignal != model.TerminateSignal { |
There was a problem hiding this comment.
If terminate signal arrived during RemoveFlowDetailsFromCatalog activity, in the end the catalog row is not removed and stays as RESYNC. Can introduce finalDrop bool, starting as false and set to true when the terminate signal comes as part of the handler here, and run RemoveFlowDetailsFromCatalogRequest again if it was resync and now a termination
| var onFlowSignal func(model.CDCFlowSignal, bool) | ||
| onFlowSignal = func(val model.CDCFlowSignal, _ bool) { | ||
| activeSignal = model.FlowSignalHandler(activeSignal, val, logger) | ||
| flowSignalChan.AddToSelector(sigSelector, onFlowSignal) |
There was a problem hiding this comment.
I don't think we needs a second AddToSelector inside the callback (same for onStateChange)? The callback can be inlined then
| var onStateChange func(*protos.FlowStateChangeRequest, bool) | ||
| onStateChange = func(req *protos.FlowStateChangeRequest, _ bool) { | ||
| if req.RequestedFlowState == protos.FlowStatus_STATUS_TERMINATING { | ||
| activeSignal = model.TerminateSignal |
There was a problem hiding this comment.
Propagate req.SkipDestinationDrop and req.DropMirrorStats as well
6169b21 to
4b9278f
Compare
❌ Test FailureAnalysis: Deterministic compile/build failure — |
❌ Test FailureAnalysis: A deterministic Go compilation error ("not enough arguments in call to s.conn.SetupReplication" in e2e/postgres_qrep_test.go:157) caused the e2e package to fail to build, which is a real code bug, not a flaky test. |
…ation-slot-creation-getting-stuck