Skip to content

Reuse standalone native insert request buffers after completion - #5446

Merged
snissn merged 1 commit into
mainfrom
codex/5444-native-insert-wire-buffer
Nov 15, 2026
Merged

snissn merged 1 commit into
mainfrom
codex/5444-native-insert-wire-buffer

Conversation

@snissn

@snissn snissn commented Nov 15, 2026 •

Copy link
Copy Markdown
Owner

Standalone native inserts own their staged inputs before synchronous command completion, but the gateway still discards their received buffer after every insert. This change retains the capped connection buffer only when the current collection manager is the exact standalone native owner and no cluster submitter is configured. General/legacy and routed managers keep their existing ownership boundary.

Closes #5444. Part of #5435; parent Load > MongoDB remains unfulfilled. Host111 and p99.9 policy remain with #5434.

Focused normal and race tests pass BSON/JSON and OP_MSG/OP_QUERY ownership cases. Tests poison the actual received-body alias after command completion, verify acknowledged values, checkpoint, check Close and fresh reopen. Native reuse was observed RED before the change and GREEN afterward; exclusions and the existing retention cap remain covered.

Host185 compares exact main9634898f with candidate198a39df using fresh databases,100,000 Load inserts,16 clients,BSON,relaxed w:1, then95%read/5%update. Four ordinary ABBA short cases pass all original ACK, census, checked Close, reopen and stopped-storage checks. Paired Load TPS ratio is0.999893 (neutral), short mixed1.039110; short mixed lasts only~0.2s and is not sustained evidence.

A separate two-case diagnostic measures actual whole-Load TotalAlloc1,549,587,256→1,422,043,040 bytes (−8.23%;15,495.9→14,220.4B per Load operation), and9,132,106→9,036,811 objects (−1.04%). Sampled ReadMessageInto allocation falls122.66→2.50MiB, consistent with the exact-feature finite public benchmark saving~1.13KB/insert. Sampled profiles are attribution only; actual runtime counter deltas establish the full-Load saving. Load prefix peak RSS increases202.8→215.8MB in this single instrumented pair; no RSS improvement is claimed. The10k mixed diagnostic allocates+5.43% bytes/+2.75% objects; no sustained allocation inference is made.

Focused wire and native-catalog interaction checks pass normally and under race after integration onto merged catalog main. All eight current-head CI workflows pass on their original attempt (55 successful checks), with zero review threads. Hosted Codex hit its usage limit on this exact head (bot response); an independent, read-only exact-head source/lifetime review accepted the change, recorded as INTERNAL_SUBAGENT_REVIEW. This satisfies the permitted internal source-review fallback; it is not hosted approval or a CI waiver.

Four ordinary sustained ABBA cases also pass the original numerical guards: 100k Load plus 6M mixed operations per fresh database, each mixed phase114–119seconds. Paired Load TPS ratio1.010780; mixed0.985207; baseline Load spread1.00675. All original ACK, census, checked client/service Close, fresh reopen and stopped-storage checks pass. Root explicitly accepts disclosed costs for the independently measured allocation reduction: gateway Close~214→264ms in both pairs; READ maximum6.723→7.731ms and6.955→9.207ms. READ p99.9 increases35/14µs; UPDATE p99 increases436/162µs, p99.9 changes−128/+864µs. No latency improvement is claimed. Stopped allocated bytes ratios0.9123/0.9087 pass; no general storage-efficiency claim. The independent raw sustained audit accepted all 392 retained hashes and reproduced the sustained numerical screen exactly, including all four lifecycle and source/runtime bindings. The two runtime ELFs are intentionally omitted from the transferred evidence; their retained build bindings and remote checks remain explicit.

The earlier88155 Linux race-shard failure in TestStandaloneNativeDictionaryCachePolicy remains retained and unresolved under #5447; the focused native diagnostic passed without reproducing it and is inconclusive. The integrated198a source has a complete fresh green CI suite; no unchanged-head retry or waiver was used. Source/runtime counter/profile/ordinary timing packets and all prior failures are retained under the #5435 evidence root. Actual merged-main/Mongo validation follows separately.

Exact source:198a39df0db31f79584c109a4958191cb8cd3329, directly on actual merged main9634898f034588b5683c01deda59917ac9fec8e5. The five gateway feature files are byte-identical to88155; only the generated CI discovery digest changed during integration. Previous source and every original failed result are preserved.

@coderabbitai

coderabbitai Bot commented Nov 15, 2026 •

Copy link
Copy Markdown

Explain Change →

Caution

Review failed

The pull request is closed.

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@snissn
snissn force-pushed the codex/5444-native-insert-wire-buffer branch from 88155fd to 198a39d Compare November 15, 2026 06:43

snissn commented Nov 15, 2026

Copy link
Copy Markdown
Owner Author

@codex review

Please review exact head198a39df0db31f79584c109a4958191cb8cd3329 on merged main9634898f, especially native owner/cluster dispatch fences, received-body ownership through the insert coalescer, completion/error/Close boundaries and retained buffer cap. Focused normal/race and independent source review passed. Public short ABBA is throughput-neutral with8.23% whole-Load allocated-byte savings in the separate diagnostic; ordinary sustained validation and final CI are still pending. No request to waive their gates.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 15, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-15T07:29:56.938032Z 198a39d Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, add credits to your account and enable them for code reviews in your settings.

snissn commented Nov 15, 2026

Copy link
Copy Markdown
Owner Author

Current-head readiness checkpoint for 198a39d: all8 workflows completed successfully on attempt1; all55 checks SUCCESS; zero review threads. Historical88155 race failure remains retained and causally unresolved; #5447 closed INCONCLUSIVE after one focused nonreproducing diagnostic and a bounded source audit. This is new integrated-source CI, not an unchanged retry or a claimed repair.

Hosted Codex was requested once for this exact head and returned usage-limit unavailable. No hosted-clean claim or additional manual retry. The effective github-pr-mergeable fallback accepts INTERNAL_SUBAGENT_REVIEW: independent agent /root/catalog_final_fallback_review, routed gpt-6.1-sol, source-only ACCEPT at base9634898f/head198a39df, all6 changed paths and dispatch/staging/coalescer lifetime/Close/cap callers, retained focused normal/race results. No construction role or candidate edits; no blocking findings. Review artifact SHA fb1d3d892281b26b3ff604a2a49d9b80b0fd2818bcfd7c1dc2835e362a50c9ee; Root fallback record SHA a70d7cb62bfc0096ed3a77ffe5d3c3fa1ce9f8a784728f2797db8b349eed2a53.

Fresh whole-Load actual allocation saving is8.23% bytes/1.04% objects. Attribution correction to frozen local grant wording: sampled ReadMessageInto falls122.66→2.50MiB; it does not disappear. Original grant and raw profiles are preserved, with an explicit addendum. Actual counters, source lifetime proof and exact-feature benchmark establish benefit independently of sampled absence. Short4ABBA passes with neutral Load and accepted bounded costs; separate4ABBA sustained validation is still running. CI/review completion does not waive that remaining performance gate. Parent #5435 and the actual-main/Mongo target remain open.

@snissn
snissn marked this pull request as ready for review November 15, 2026 07:28
Copilot AI balanced review requested due to automatic review settings November 15, 2026 07:28

Copilot AI 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.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

@snissn
snissn merged commit ee22c28 into main Nov 15, 2026
55 checks passed
@snissn
snissn deleted the codex/5444-native-insert-wire-buffer branch November 15, 2026 07:29

snissn commented Nov 15, 2026

Copy link
Copy Markdown
Owner Author

Merged as ee22c28. Actual origin/main fetched and verified: parents9634898f+198a39df, whole treef200fdef exactly reviewed198a, all6 changed files read back and hashed. Final live gates:55SUCCESS across8 current-head original-attempt workflows, MERGEABLE/CLEAN, zero threads. Hosted Codex unavailable due exact-head quota; independent read-only exact source ACCEPT used the permitted internal fallback, not a CI waiver. Independent sustained replay accepted392 archive hashes and exactly reproduced Load1.010780/mixed0.985207 and all4 lifecycle bindings, with disclosed bounded Close/tail costs. Fresh actual merged-main/Mongo comparison is being prepared on185; parent #5435 target remains unmet. Worktree retained until source consumers finish.

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.

Reuse insert wire buffers for the standalone native manager after completion

2 participants