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

Chaguar / committer / 39123611520
91%
main: 91%

Build:
Build:
LAST BUILD BRANCH: bench/sidecar-end-to-end
DEFAULT BRANCH: main
Ran 18 Oct 2026 11:37AM UTC
Jobs 3
Files 143
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

18 Oct 2026 11:31AM UTC coverage: 90.514% (-0.2%) from 90.729%
39123611520

Pull #826

github

liran-funaro
[cmd, statedb] Add committer delete-clone to drop a snapshot database clone

#### Type of change

- New feature
- Dependency update
- Documentation update

#### Description

- Adds `committer delete-clone --config <vc-config> --tx-id <snapshot-tx-id>`, which,
  like `init-db`, reads the VC config and works on the state database directly, so it
  can run while the committer is running. It drops the database named by the
  `_snapshot` record's `clone_database` field and clears that field, keeping the
  record so the snapshot's status and hash stay queryable.
- Deletion is refused unless the snapshot is `CHECKPOINTED` or `ABORTED`
  (`statedb.ErrSnapshotCloneInUse`), because only then will the clone never be hashed
  again. An empty or unknown `--tx-id` fails; a record whose `clone_database` is
  already empty succeeds for any status, so running the command again is a no-op.
- The logic lives in `statedb.DeleteSnapshotClone`. `adminExec` moves from
  `service/vc` to `statedb.AdminExec`, so snapshot creation and deletion share the
  maintenance-database connection.
- Adds `ClearCloneDatabase` to `statedb.SnapshotUpdate`. The clear keeps the locked
  row's error text and requires the locked row to still have the status the command
  checked, so a concurrent writer is neither overwritten nor bypassed.
- Adds `statedb.SnapshotStateManager.Read(tx_id)` and the `statedb.ErrSnapshotNotFound`
  sentinel, sharing `ReadLatest`'s read-and-decode step.
- Bumps fabric-x-common to `38584e4` for the `ABORTED` snapshot status.

#### Additional details (Optional)

The drop and the record update cannot be one atomic transaction, because PostgreSQL
does not allow `DROP DATABASE` inside a transaction. They are ordered drop-then-clear:
a stop between them leaves the record naming a missing database, and running the
command again finishes (`DROP DATABASE IF EXISTS` is a no-op, then the clear runs). The
reverse order could leave an orphan database that no record names.

The si... (continued)
Pull Request #826: [cmd, statedb] Add committer delete-clone to drop a snapshot database clone

103 of 118 new or added lines in 4 files covered. (87.29%)

25 existing lines in 6 files now uncovered.

9819 of 10848 relevant lines covered (90.51%)

10585.88 hits per line

Uncovered Changes

Lines Coverage ∆ File
12
79.31
utils/statedb/snapshot_clone.go
2
93.1
cmd/committer/delete_clone_cmd.go
1
77.05
2.27% utils/statedb/snapshot_state.go

Coverage Regressions

Lines Coverage ∆ File
8
79.49
-1.61% service/sidecar/sidecar.go
6
83.33
-1.96% service/vc/database.go
5
88.37
-2.91% service/coordinator/validator_committer_manager.go
3
93.37
-1.66% service/coordinator/signature_verifier_manager.go
2
97.47
-1.27% mock/sigverifier.go
1
93.27
-0.96% mock/coordinator.go
Jobs
ID Job ID Ran Files Coverage
1 core-db-test - 39123611520.1 18 Oct 2026 11:40AM UTC 109
48.68
GitHub Action Run
2 unit-test - 39123611520.2 18 Oct 2026 11:38AM UTC 95
86.17
GitHub Action Run
3 db-test - 39123611520.3 18 Oct 2026 11:37AM UTC 143
78.29
GitHub Action Run
Source Files on build 39123611520
  • Tree
  • List 143
  • Changed 10
  • Source Changed 0
  • Coverage Changed 10
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Pull Request #826
  • PR Base - main (#38118405099)
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