Skip to content

chore(deps)(deps): bump golang.org/x/sys from 0.36.0 to 0.37.0 in /src/amqp-go#1

Closed
dependabot[bot] wants to merge 1 commit into
mainfrom
dependabot/go_modules/src/amqp-go/golang.org/x/sys-0.37.0
Closed

chore(deps)(deps): bump golang.org/x/sys from 0.36.0 to 0.37.0 in /src/amqp-go#1
dependabot[bot] wants to merge 1 commit into
mainfrom
dependabot/go_modules/src/amqp-go/golang.org/x/sys-0.37.0

Conversation

@dependabot

@dependabot dependabot Bot commented on behalf of github Nov 3, 2025

Copy link
Copy Markdown

Bumps golang.org/x/sys from 0.36.0 to 0.37.0.

Commits
  • 1edeebe unix: mkall.sh: fail if docker build failed
  • ecada54 unix: use slices.{Equal,Sort} in tests
  • 5e63aa5 windows: export O_FILE_FLAG_* to be used in os.OpenFile on windows
  • 033906b unix: add (*CPUSet).Fill helper to enable all CPUs
  • 6be6c58 windows: add FlushConsoleInputBuffer and GetNumberOfConsoleInputEvents
  • 32e2038 unix: use Go 1.21+ clear built-in
  • 137f2ed sys: add support for NetBSD getvfsstat
  • See full diff in compare view

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

@dependabot @github

dependabot Bot commented on behalf of github Nov 3, 2025

Copy link
Copy Markdown
Author

Labels

The following labels could not be found: dependencies, go. Please create them before Dependabot can add them to a pull request.

Please fix the above issues or remove invalid values from dependabot.yml.

@dependabot
dependabot Bot force-pushed the dependabot/go_modules/src/amqp-go/golang.org/x/sys-0.37.0 branch 2 times, most recently from 5ff5ea8 to d3322dc Compare November 4, 2025 23:14
Bumps [golang.org/x/sys](https://github.com/golang/sys) from 0.36.0 to 0.37.0.
- [Commits](golang/sys@v0.36.0...v0.37.0)

---
updated-dependencies:
- dependency-name: golang.org/x/sys
  dependency-version: 0.37.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot
dependabot Bot force-pushed the dependabot/go_modules/src/amqp-go/golang.org/x/sys-0.37.0 branch from d3322dc to 90d3e08 Compare November 5, 2025 23:30
@dependabot @github

dependabot Bot commented on behalf of github Nov 10, 2025

Copy link
Copy Markdown
Author

Superseded by #9.

@dependabot dependabot Bot closed this Nov 10, 2025
@dependabot
dependabot Bot deleted the dependabot/go_modules/src/amqp-go/golang.org/x/sys-0.37.0 branch November 10, 2025 18:42
x0a1b added a commit that referenced this pull request Jun 24, 2026
…ypass

Phase 16, Commit 2: Lock contention + config wiring.

P1: Replace ds.mutex with sync.Map for queue rings (disruptor_storage.go)
- Replaced global sync.RWMutex + map[string]*QueueRing with sync.Map
- getQueueRing() helper: lock-free reads on publish/get/delete hot path
- getOrCreateQueueRing(): double-check locking (mutex only during rare
  queue creation — not on every publish)
- Eliminates #1 throughput limiter: all publishes across all queues
  no longer serialize on a single write lock
- Removed dead deliveryTagCounters map (tags from broker global counter)

P6: Reduce AvailableChannelBuffer 10M → 100K (config.go)
- 80MB → 800KB per queue (100x memory reduction)
- 1000 queues: 80GB → 800MB — enables realistic multi-queue deployments
- 100K buffer at 100K msg/s = 1s headroom (sufficient for consumer reconnect)

P8: Fix durable message spill bypass (disruptor_storage.go)
- Durable messages (DeliveryMode=2) now also skip ring buffer when above
  spill threshold — they're already in WAL, entering ring buffer would
  overwrite unconsumed slots and force consumers onto slow WAL read path
- Both durable and transient skip ring buffer when >80% full; messages
  retrieved from WAL on-demand when consumers need them

Code review: 1 round, 0 CRITICAL, 0 MAJOR, 3 MINOR (comment fix)
All tests pass with -race across all packages.
x0a1b added a commit that referenced this pull request Jun 26, 2026
CRITICAL fixes:
- #1 Fanout clone: clone *Message per target queue in PublishMessage
  so each queue owns its own copy with its own DeliveryTag (R6 fix)
- #2 PendingAck: implement in-memory sync.Map-based pending ack
  tracking (was all no-op stubs — multiple-ack/reject/nack broken)
- #3 Nil WAL guard: guard spill path with ds.wal != nil check (was
  nil-pointer panic on disk failure)
- #4 Wire AckCursor: call RegisterConsumerCursor/DeliverToConsumer/
  AckFromConsumer/NackFromConsumer/UnregisterConsumerCursor from
  broker (all 7 interface methods were never called — dead code)

MAJOR fixes:
- #5 minAckCursor skip-ahead: sync QueueState.minAckCursor from
  storage AckCursor after each ACK (was only +1, stuck under
  out-of-order ACKs causing permanent backpressure)
- #6 Duplicate ACK guard: check deliveryIndex before processing
  (was double-decrementing inflight counter)
- #7 RejectMessage requeue: always requeue or discard (was depending
  on GetPendingAck which always returned not-found — requeue never
  executed, message orphaned)
- #8 NacknowledgeMessage: same fix as RejectMessage
- #9 computeDepthHighWM default: align with storage default 256K
  (was 64K — publishers blocked 4x too early)

Cleanup:
- Removed dead AdvanceMinAckCursor (passed tag=0, never called)
- Set message.DeliveryTag on original pointer for caller inspection
- Added SetMinAckCursor to QueueState

Full test suite passes with -race across all 13 packages.
x0a1b added a commit that referenced this pull request Jul 13, 2026
…-file GC

Durable fan-out of a large body to N>=2 queues previously wrote N full copies
to the WAL (one per queue record). ITER5 writes the body ONCE as a new
BodyBlock record plus N tiny reference records, all fused into ONE
group-commit batch / ONE fdatasync / ONE file, and reclaims it with the
existing whole-file-delete GC (implicit refcount = |unacked references|). No
mutable on-disk refcount, so the RabbitMQ "counter must survive a crash / be
regenerated" failure class cannot occur; recovery reconstructs refcount = N
conservatively from the empty ackBitmap.

This commit lands the WAL layer (design D + cold-tail hardening); the broker
and DisruptorStorage fusion that routes a durable fan-out through it follow.

Record + codec
  - WALRecordTypeBodyBlock=2: [fanoutHint u32][bodyLen u32][body], framed by the
    standard [CRC][len][type] envelope. appendBodyBlockRecord serializes it with
    the same record-relative backpatch as appendMessageRecord, so a block and its
    refs pack contiguously into one batch buffer. The block is NOT added to the
    offset index / file offset set — it is not a deliverable message and never
    participates in the ack/file-delete predicate; it rides its file's fate.
  - parseMessagePayload reference arm (the ITER4 bodyKindReference seam) now reads
    BodyRef and FALLS THROUGH to the optional-field parse, returning ok=true
    (Body==nil). Forward-only: no shipped build emits a 0x01 arm, so the behavior
    change is observable only for ITER5-written files. Reference resolution to
    real bytes is the caller's job (recovery map / second ReadAt).

Fused write unit (co-location invariant, §3)
  - writeRequest gains an optional *sharedUnit; the whole unit (shared body +
    N sharedSubs) is ONE writeChan item, so it is never split across batches and,
    because flushBatch rolls only AFTER the whole-batch Write+fsync, the block and
    all N refs are provably in ONE file. flushBatch branches on req.unit: nil is
    today's path byte-for-byte (zero added allocs/locks/records on the N==1 hot
    path); non-nil emits the BodyBlock first (capturing its file-relative offset
    as the 8-byte locator), then each sub via the existing bodyKindReference writer
    arm (BodyRef set then cleared so the in-memory message stays a clean inline
    message — a later dead-letter/requeue can never emit a dangling reference).
    All-or-nothing per unit on serialize error. Reference positions are indexed
    post-fsync via a lazily-allocated side list (nil, hence zero-cost, on the hot
    path). deliverCompletions fires each sub's onDone/done in sub order.
  - WriteSharedAsync enqueues the unit; completions fire only after the unit is
    durable AND indexed (A1 preserved — one Write, one fdatasync, index+visibility
    after the barrier).

Recovery + live read
  - scanWALFile tracks a running record-start offset and a per-file bodyByOffset
    map, adds a WALRecordTypeBodyBlock case, and resolves a message's 8-byte
    BodyRef to Body from the map (clearing BodyRef). The block precedes its refs,
    so refs always resolve in one pass. Torn tail: CRC drops the partial trailing
    record; a missing ref is simply absent (at-least-once correct — a torn unit's
    fsync never completed, so the publisher was never confirmed). Reads switched
    to io.ReadFull so a large block body cannot be under-read into a false torn
    tail and offset accounting stays exact.
  - readMessageAtPosition / readMessageFromFile resolve a reference with a second
    ReadAt for the co-located BodyBlock on the SAME held handle (readBodyBlockAt),
    so the block read enjoys the ref record's handle-lifetime protection (§5.3).

Cold-tail hardening (CEO #1, §2)
  - QueueWAL.currentFileHasSharedBody (under fileMutex) is captured into
    walFileInfo.hasSharedBody by rollFile. performCheckpoint SKIPS a shared-body
    file so the body survives as ONE copy across arbitrarily many checkpoints,
    reclaimed whole by tryDeleteOldFiles on all-ack — instead of re-inlining into
    N segment copies under slow-consumer backlog. New WALConfig.SharedBodyMaxPinAge
    (default 0 = rely on RetentionPeriod) is an age backstop that re-inlines +
    deletes past its bound (honest, bounded degradation). tryDeleteOldFiles is
    unchanged.

Segments always inline (§3.6)
  - serializeSegmentMessage errors if BodyRef is set; readSegmentMessageAt rejects
    a 0x01 arm — a dangling reference can never be persisted into or read from a
    segment (checkpoint/recovery resolve+clear BodyRef first).

Tests (TDD, all -race clean): fan-out writes body once + K refs; N==1 hot path
byte-identical to appendMessageRecord's inline output and emits no BodyBlock;
below-threshold stays inline; unit not split across a roll; body durable before
any completion (A1); refcount-zero reclaims the whole file; partial-ack retains
the body (no premature free); crash recovery reconstructs refcount==K incl. two
torn-tail cases; GC never frees an in-flight unacked body (-race); checkpoint
re-inlines at the backstop; cold tail stays one copy across checkpoint then
reclaims whole; segment rejects a dangling reference. Updated the ITER4 body-union
seam test to the forward-only ok=true contract.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
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.

0 participants