• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

hyperledger / fabric-x-committer / 30372655358
91%

Build:
DEFAULT BRANCH: main
Ran 28 Jul 2026 03:23PM UTC
Jobs 3
Files 130
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

28 Jul 2026 03:17PM UTC coverage: 91.282% (-0.009%) from 91.291%
30372655358

push

github

web-flow
[vc] Create snapshot clone before committing the _snapshot marker (#701)

#### Type of change

- New feature
- Documentation update

#### Description

- On `_snapshot` commit, create a native zero-copy DB clone BEFORE the
marker's
txID commits, then rewrite the marker to a PENDING `SnapshotState`
carrying the
clone name — persisted atomically with the txID by the normal commit
path
  (invariant: txID committed <=> clone exists <=> PENDING row).
- Clone as of current time via plain `CREATE DATABASE ... TEMPLATE` (no
`AS OF`):
  the snapshot TX is drained/standalone, so "now" is the exact cut.
- Both backends: YugabyteDB `TEMPLATE` clone (source stays live;
requires
`enable_db_clone` + a PITR snapshot schedule); PostgreSQL `TEMPLATE ...
  STRATEGY=FILE_COPY` behind the ALLOW_CONNECTIONS/terminate dance.
- Skip cloning when the snapshot txID already exists in `tx_status`
(resubmission
or duplicate) so no orphan clone is left behind; a duplicate clone name
is
  treated as reuse. Clones are never dropped here.
- Wire the clone into the committer before the commit retry loop; on
clone
  failure the batch is not committed and the coordinator re-drives it.
- Reuse `committerpb.IsSystemNamespace`/`SystemNamespaces` from
fabric-x-common
  (bump the dep) and drop the duplicated local helpers.

#### Additional details (Optional)

- `adminExec` runs clone/admin DDL on a dedicated out-of-pool connection
with a
bounded dial timeout and is deliberately not retried (deterministic DDL
errors;
  42P04 "already exists" is mapped to success).
- Test-only `EnsureSnapshotScheduleForCloning` provisions the required
YugabyteDB
snapshot schedule per test DB (yb-admin; no SQL API); the container
enables
  `enable_db_clone`.
- Docs: added a snapshot subsection to `docs/validator-committer.md` and
a
provisioning/tuning step to `docs/deployment-guide.md` noting the
schedule is
  mandatory and retention should be kept short.
- Verified with `make test-all-db` (YugabyteDB snapshot s... (continued)

120 of 142 new or added lines in 7 files covered. (84.51%)

15 existing lines in 7 files now uncovered.

10450 of 11448 relevant lines covered (91.28%)

35210.18 hits per line

Uncovered Changes

Lines Coverage ∆ File
20
83.61
service/vc/snapshot.go
2
87.8
-3.1% service/vc/committer.go

Coverage Regressions

Lines Coverage ∆ File
4
87.8
-3.1% service/vc/committer.go
3
86.24
-2.75% loadgen/adapters/broadcast.go
2
85.25
-0.82% service/sidecar/relay.go
2
94.67
-0.82% service/coordinator/coordinator.go
2
86.42
1.78% service/vc/database.go
1
86.42
-1.23% loadgen/adapters/verifier.go
1
80.33
-3.25% utils/utils.go
Jobs
ID Job ID Ran Files Coverage
1 unit-test - 30372655358.1 28 Jul 2026 03:25PM UTC 94
84.6
GitHub Action Run
2 core-db-test - 30372655358.2 28 Jul 2026 03:23PM UTC 100
46.56
GitHub Action Run
3 db-test - 30372655358.3 28 Jul 2026 03:24PM UTC 130
79.45
GitHub Action Run
Source Files on build 30372655358
  • Tree
  • List 130
  • Changed 17
  • Source Changed 0
  • Coverage Changed 17
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • a9da1955 on github
  • Prev Build on main (#30346792200)
  • Next Build on main (#30427229518)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc