Skip to content

fix(cmd): start blob-store age sweeper in the all-in-one binary - #269

Merged
mrz1836 merged 1 commit into
bsv-blockchain:mainfrom
mboyd1:fix/all-in-one-blob-sweeper
Oct 29, 2026
Merged

mrz1836 merged 1 commit into
bsv-blockchain:mainfrom
mboyd1:fix/all-in-one-blob-sweeper

Conversation

@mboyd1

@mboyd1 mboyd1 commented Oct 20, 2026

Copy link
Copy Markdown
Contributor

What Changed

  • cmd/merkle-service/main.go now calls store.StartAgeSweeperFromConfig (and defers its stop), mirroring cmd/block-processor/main.go.

Why It Was Necessary

Testing Performed

  • CGO_ENABLED=0 go build ./cmd/merkle-service, go vet ./cmd/merkle-service/, go test ./internal/store/ -run Sweep.
  • The sweeper is a no-op for memory stores or when sweepIntervalSec/sweepMaxAgeSec is 0, so test and ephemeral setups are unaffected.

Impact / Risk

  • Low. One sweeper per process, which is the same single-replica assumption block-processor already relies on, since all-in-one is single-process. Existing all-in-one deployments with a large backlog will see a long first sweep at startup (synchronous sweep() before the ticker). On the 5.5M-file store that would be a one-time multi-minute directory walk.

Notifications

…blockchain#267)

The sweeper was wired only into cmd/block-processor, so all-in-one
deployments never age-swept file:// subtree blobs. A production store grew
to 5.5M files in one directory, filled ext4's htree index and failed every
write with ENOSPC at 19% disk usage, stalling SEEN_ON_NETWORK.
@mboyd1
mboyd1 requested a review from mrz1836 as a code owner October 20, 2026 00:36
@github-actions github-actions Bot added fork-pr PR originated from a forked repository requires-manual-review PR or issue requires manual review by a maintainer or security team labels Oct 20, 2026
@github-actions

Copy link
Copy Markdown

👋 Thanks, @mboyd1!

This pull request comes from a fork. For security, our CI runs in a restricted mode.
A maintainer will triage this shortly and run any additional checks as needed.

  • 🏷️ Labeled: fork-pr, requires-manual-review
  • 👀 We'll review and follow up here if anything else is needed.

Thanks for contributing to bsv-blockchain/merkle-service! 🚀

@mrz1836 mrz1836 assigned galt-tr and unassigned mrz1836 Oct 20, 2026
@mrz1836
mrz1836 requested a review from galt-tr October 20, 2026 04:20

@mrz1836 mrz1836 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@mrz1836
mrz1836 merged commit b58c4a2 into bsv-blockchain:main Oct 29, 2026
19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fork-pr PR originated from a forked repository requires-manual-review PR or issue requires manual review by a maintainer or security team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

All-in-one binary never starts the blob-store age sweeper; flat subtree store fills ext4 htree (ENOSPC at 19% disk)

3 participants