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

hyperledger / fabric-x-committer / 36674936712
91%
main: 91%

Build:
Build:
LAST BUILD BRANCH: query-tls-refresh-ignore-older-config
DEFAULT BRANCH: main
Ran 30 Sep 2026 05:51AM UTC
Jobs 3
Files 141
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

30 Sep 2026 03:03AM UTC coverage: 90.798% (+0.06%) from 90.735%
36674936712

Pull #826

github

cendhu
[vc, sidecar] Delete a snapshot database clone on admin request

#### Type of change

- New feature
- Documentation update

#### Description

- Adds `DeleteDBCloneForSnapshot(tx_id)`, propagating sidecar → coordinator → VC.
  The VC drops the database named by the `_snapshot` record's `clone_database`
  field and clears that field via a versioned namespace write; clearing it *is*
  the deletion signal, since `SnapshotState` carries no deletion timestamp. The
  record is retained, so the snapshot's status and hash stay queryable after its
  database is gone.
- Deletion is refused unless the snapshot's status is `CHECKPOINTED`
  (`FAILED_PRECONDITION`). Until then the clone is the only artifact from which
  the snapshot hash can be recomputed or a contested hash re-verified, so
  dropping it would be unrecoverable.
- Reports `INVALID_ARGUMENT` for an empty `tx_id` and `NOT_FOUND` for an unknown
  one. A repeated delete of an already-cleared record succeeds: the caller cannot
  distinguish a retry of its own request from a duplicate, and both mean the
  database is gone. That check precedes the status gate, so a retry of a delete
  that already succeeded stays a success.
- Adds `ClearCloneDatabase` to `statedb.SnapshotUpdate`, so the deletion path can
  clear `clone_database` through the shared `_snapshot` record accessor. The clear
  re-asserts `CHECKPOINTED` and sets `ExpectedStatus` to it, so the locked row must
  still be `CHECKPOINTED` for the clear to apply.
- Adds `statedb.SnapshotStateManager.Read(tx_id)` and the `statedb.ErrSnapshotNotFound`
  sentinel it reports, extracted from `ReadLatest`'s read-and-decode step so both agree
  on how a missing row and an undecodable value are reported. `ReadLatest` keeps
  treating a missing row as corruption, since its key comes from the pointer rather
  than from a caller.
- Records `DeleteDBCloneForSnapshot` calls in one embedded `mock.deleteCloneRecorder`
  shared by the mock coordinator and the mock vcse... (continued)
Pull Request #826: [vc, sidecar] Delete a snapshot database clone on admin request

94 of 97 new or added lines in 9 files covered. (96.91%)

23 existing lines in 6 files now uncovered.

9847 of 10845 relevant lines covered (90.8%)

21829.99 hits per line

Uncovered Changes

Lines Coverage ∆ File
2
85.15
0.88% service/vc/database_snapshot.go
1
81.82
7.04% utils/statedb/snapshot_state.go

Coverage Regressions

Lines Coverage ∆ File
6
83.33
-1.96% service/vc/database.go
5
94.44
-2.49% service/coordinator/coordinator.go
4
74.26
-3.96% service/vc/validator.go
3
82.33
0.11% service/sidecar/sidecar.go
3
92.42
0.49% service/vc/validator_committer_service.go
2
86.47
-1.5% service/vc/committer.go
Jobs
ID Job ID Ran Files Coverage
1 core-db-test - 36674936712.1 30 Sep 2026 07:30AM UTC 122
50.21
GitHub Action Run
2 unit-test - 36674936712.2 30 Sep 2026 05:52AM UTC 95
86.17
GitHub Action Run
3 db-test - 36674936712.3 30 Sep 2026 05:51AM UTC 141
78.43
GitHub Action Run
Source Files on build 36674936712
  • Tree
  • List 141
  • Changed 45
  • Source Changed 0
  • Coverage Changed 45
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Pull Request #826
  • PR Base - main (#36565007287)
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