Repository navigation
Conversation
Qodo reviews are paused for this user.Troubleshooting steps vary by plan Learn more → On a Teams plan? Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center? |
|
Queue requested — the merge queue status continues in this comment ↓. |
|
mo-bot review · Commit: Review completed. Read the assessment. |
XuPeng-SH
left a comment
There was a problem hiding this comment.
mo-bot review · mo-bot-local · review
Commit: 31a0362ffc223bcd519db9f37fa7d88b6dea992a
Assessment: approve
The single receiver preserves receive/decode/publication order through the existing conntrack owner, preventing the demonstrated no-loss map retention without adding state or recovery machinery. No actionable defect remains.
Model: gpt-6.1-sol / max
Session: 01a1e395-a6d9-7ad1-bf20-81f1c6210100 · slot 2 · generation 0
Validation:
-
Reviewed the complete delta and affected startup, consumer and close paths; verified pinned conntrack/netfilter/netlink source archives against frozen go.sum checksums.
-
Reused successful frozen-head build, UT, SCA, coverage and compose CI results, plus attributed author regression, owning-package normal/race and bounded kernel/churn/capacity reports.
-
Clean-source, scope, discussion and receipt/log audits passed; validation-reconciliation.json records the retained evidence.
Limitations:
-
No local Go/native/kernel tests were rerun. Author runtime/race/capacity reports lack raw local_validation artifacts; synthetic throughput is not a production guarantee.
-
Kernel event loss and fatal receive errors remain outside this no-loss ordering fix. The separate #31954 panic is not claimed resolved.
🚫 Left the queue · pull request dequeued3 h 35 min in the queue, with no time running CI. So far
Reason Pull request #32854 has been dequeued Pull request from fork cannot be queued. This pull request comes from a fork, and Mergify needs the author's permission to update its branch.
To get back in the queue
Merge conditions not met when it left the queue
Tick the box to put this pull request back in the merge queue (same as
2 merge conditions met
Times in UTC · dashboard · how the merge queue works |
|
已补上本轮挑战确认的 ENOBUFS 后监控永久停止问题:后续 PR #32865(本 PR 已合并,故没有改写原分支)。保留单 worker 顺序性,致命错误后关闭旧 listener、限频重建并使用独立的新统计;明确标记 since_listener_start / complete=false,不冒充丢失期间的完整内核快照。最终只改两个文件,不改 SQL、依赖或服务退出流程。全包 normal/race 各 186 项通过,8 个专项各 race 100 次通过;隔离 netns 中真实 ENOBUFS 恢复三轮通过,每轮后续 32 TCP + 32 UDP 的 NEW/DESTROY 都进入实际 MO 消费者并归零。增量 SCA、构建通过;新 PR 的 CI 尚待完成。 |
## What type of PR is this? - [ ] API-change - [x] BUG - [ ] Improvement - [ ] Documentation - [ ] Feature - [ ] Test and CI - [ ] Code Refactoring ## Which issue(s) this PR fixes: Related to #32851. Follow-up to merged #32854 for the fatal-receive-error availability gap identified during its review. ## What this PR does / why we need it: The ordered, single-worker conntrack listener exits on ENOBUFS or a decode error. Previously MO only logged that error and continued reporting its stale map forever. This affects diagnostic connection statistics, not SQL or stored data. - Retain one worker and the existing 65,536-entry queue. A fatal listener error invalidates that statistics generation, closes its socket, and retries with fresh queues/map at most once every five seconds. - Drain pending publications while joining the old listener. Stop retrying if socket cleanup itself fails; repeated Dial/Listen failures do not busy-loop or accumulate listeners. - Keep existing log names/count fields, adding `scope=since_listener_start`, `complete=false`, and a start timestamp. This resumes future observation; it does **not** reconstruct events lost during overflow or claim a full kernel-table snapshot. - Preserve optional startup and process lifetime. No SQL path, dependency, service-shutdown hook, configuration, periodic dump, or reconciliation framework changes. Validation on Linux/Go 1.27.1, using the current socket v0.7.0 dependency: - Full `cmd/mo-service` package: normal and race both pass, 186 tests/subtests, zero skipped. - Eight focused lifecycle tests: 100 race repetitions each. Covers stale-generation isolation, repeated recovery, bounded failed retries, closed/nil channels, blocked publications, and cleanup failures. - Actual changed MO consumer/supervisor in an isolated network namespace: three race-enabled rounds each force a real kernel ENOBUFS, restart, observe 32 TCP + 32 UDP flows and their deletion, and report `0 -> 64 -> 0`. Final kernel dump is empty; cleanup joins successfully. - Incremental molint and golangci-lint 2.14.0: pass; native-linked binary build and `-h`: pass. The monitor remains process-owned. An extra immediate-shutdown hook was deliberately excluded after testing exposed the dependency's worker-registration/Close race; runtime recovery here starts only after the worker has delivered its fatal error. Initial permission/setup failure remains nonfatal and does not start background retries. Repository-wide CI and production acceptance remain separate from these local results. Approved-by: XuPeng-SH <[email protected]>
What type of PR is this?
Which issue(s) this PR fixes:
Fixes #32851
What this PR does / why we need it:
Use one ordered conntrack receiver, through the existing
ListenAPI.conntrack v0.5.1 workers independently receive, decode and publish events.
With multiple workers a flow's DESTROY can reach
logConnTrackbefore its NEW,even when every event was received. The consumer then retains the destroyed
flow and reports an incorrect active-connection count.
This is intentionally separate from the socket/watcher upgrade in #32845.
It does not change dependencies, the 65,536-event channel, the map consumer,
SQL behavior, or shutdown ownership. No expiry, tombstone map, reconciliation
loop or new configuration is introduced. The unused
runtimeimport is removed.The existing startup/Listen-failure test now captures the worker count and
requires one ordered listener, while retaining its socket-cleanup assertion.
This avoids creating an unowned Background monitor in the unit test.
Validation on 50
Base:
43addc16ba30c3e5a0feb11447078092a5fc3953(Main).Linux amd64, Go 1.27.1,
GOAMD64=v3,GOEXPERIMENT=simd,GOWORK=off.production code (
got 20 workers); fixed code passes, including 100 racerepetitions in one process.
make -j4 cgo.cmd/mo-servicenormal tests: 169 pass, zero skipped/failed.cmd/mo-servicerace tests: 169 pass, zero skipped/failed(24.039 seconds package execution).
molintand golangci-lint 2.14.0 on thefull affected package pass, zero reported issues;
git diff --checkpasses.and delete 16,384 synthetic UDP flows per run. Validate exactly 16,384 NEW
and 16,384 DESTROY events, matching flow IDs, no receive errors and an empty
kernel table before checking the consumer's map rule.
lifecycles, all events received, kernel and map zero at every run's end;
no race reports. Additional three-run race calibration also passes.
three 16,384-flow runs also pass with one worker and zero residual entries.
Capacity and scope boundary
The bounded normal tests observed roughly 90k–115k events/sec with the current
Main dependencies. This is a synthetic capacity check, not a production
throughput guarantee; concurrent compilation and batching affect timing.
Larger 256/2048-flow bursts hit the existing kernel receive-buffer limit in
both configurations. Those failures are not counted as passing tests. The
dependency terminates a worker on fatal receive errors; single-worker listening
does not add loss recovery and must not be described as fixing all possible
conntrack inaccuracies. Kernel-loss reconciliation is outside this no-loss
event-order fix. No buffer sizes were changed to make the tests pass.
SQL BVT is not the changed boundary: this patch only changes Linux diagnostic
event delivery, verified with the real netlink interface. No customer/host
conntrack entries were changed. This does not claim to fix the separate
#31954 panic, reproduce an OOM, or address database correctness.