Skip to content

Unified ingestion workflow: streaming daemon — Slice 2 (events)#803

Closed
chowbao wants to merge 2 commits into
streaming-slice1-ledgersfrom
streaming-slice2-events
Closed

Unified ingestion workflow: streaming daemon — Slice 2 (events)#803
chowbao wants to merge 2 commits into
streaming-slice1-ledgersfrom
streaming-slice2-events

Conversation

@chowbao

@chowbao chowbao commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

Slice 2 of the unified ingestion workflow (design #722 / roadmap #777), stacked on slice 1 (#802 — the ledgers skeleton). The base of this PR is streaming-slice1-ledgers, so the diff shown here is only the events additions on top of the ledger skeleton. Review after slice 1.

What this adds (the events data type)

  • Events column families in the per-chunk hot RocksDB (pkg/stores/hotchunk), so one atomic synced WriteBatch per ledger now carries ledgers + events.
  • The events cold-segment writer in processChunk.
  • The chunk:{c}:events catalog key + its key-driven sweeps.
  • Events coverage in the audit command (INV-3 disk↔catalog) and in the crash-injection/convergence suite + the in-process lifecycle E2E.

Events is a per-chunk artifact, like ledgers — there is no window/index subsystem here (that is tx-hash, slice 3). The events wiring is small and additive on top of the skeleton.

Composes (already on feature/full-history)

pkg/stores/eventstore (#740/#756) and the events design doc getevents-full-history-design.md (#635).

Deferred to slice 3

The tx-hash CF, .bin/.idx, and the per-window rolling-index subsystem (the design's hardest-to-review component).

Testing

Built against RocksDB 10.9.1 (grocksdb 1.10.7). Full fullhistory tree green on the non-short suite incl. the lifecycle E2E: go test ./cmd/stellar-rpc/internal/fullhistory/....

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Credits must be used to enable repository wide code reviews.

@chowbao chowbao force-pushed the streaming-slice1-ledgers branch from 9611dfb to c031951 Compare June 23, 2026 16:33
@chowbao chowbao force-pushed the streaming-slice2-events branch 2 times, most recently from cb5c1e3 to a0935aa Compare June 23, 2026 16:35
@chowbao chowbao force-pushed the streaming-slice1-ledgers branch from c031951 to 62d69a7 Compare June 23, 2026 17:34
@chowbao chowbao force-pushed the streaming-slice2-events branch from a0935aa to 9c92206 Compare June 23, 2026 17:35
@chowbao chowbao force-pushed the streaming-slice1-ledgers branch from 62d69a7 to f4ca90f Compare June 23, 2026 22:32
@chowbao chowbao force-pushed the streaming-slice2-events branch 2 times, most recently from de84d1d to e823bc7 Compare June 24, 2026 02:54
@chowbao chowbao force-pushed the streaming-slice1-ledgers branch from f4ca90f to cb57955 Compare June 24, 2026 03:40
@chowbao chowbao force-pushed the streaming-slice2-events branch from e823bc7 to a5d2543 Compare June 24, 2026 03:40
chowbao added 2 commits June 23, 2026 23:45
Stacked on slice 1 (the ledgers skeleton); this commit's diff is only the
events additions on top of it. Adds the EVENTS data type to the streaming
daemon:
- events column families in the per-chunk hot RocksDB (hotchunk), so one
  atomic synced WriteBatch per ledger now carries ledgers + events;
- the events cold-segment writer in processChunk;
- the chunk:{c}:events catalog key + its sweeps;
- events coverage in the audit (INV-3 disk<->catalog) and in the
  crash-injection/convergence suite and lifecycle E2E.

Events is a per-chunk artifact, like ledgers — no window/index subsystem
(that is tx-hash, deferred to slice 3).

Composes the events store (pkg/stores/eventstore, #740/#756) and the events
design (getevents-full-history-design.md, #635), already on
feature/full-history.

Built against RocksDB 10.9.1 (grocksdb 1.10.7); fullhistory tree green on the
non-short suite incl. the lifecycle E2E.
doc.go: events adds no new streaming/*.go files (woven into existing
seams); update the coverage line, data-model artifact note, and 'Later
slices' pointer (now only tx-hash).

golangci-lint (this slice's own new findings, in the files events
modifies):
- eventstore/hot_store.go: //nolint:nilnil on the three documented
  idempotent-duplicate (nil hook/ledger, nil err) returns; wrap the
  IngestLedgerToBatch signature (lll); drop a dead //nolint:cyclop
- hotchunk: preallocate the columnFamilies slice (prealloc)
@chowbao

chowbao commented Jun 24, 2026

Copy link
Copy Markdown
Contributor Author

Superseded by a new 2-phase stacked series that re-slices this work by phase (backfill → live ingestion + lifecycle), with the MVP scope cuts (recovery / audit / convergence / retention-reconfiguration dropped) and the folded-in fixes (cold+hot ingest service + NewPrometheusSink metrics wiring, exponential withRetries backoff, deletion of the dead RunHot/RunCold stream-drain orchestration):

Each layer builds + go vet + go test -short green; the capstone (#821) also passes the lifecycle E2E. Leaving this open for now — can be closed once the new stack is reviewed.

@chowbao chowbao closed this Jun 24, 2026
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.

1 participant