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

hyperledger / fabric-x-committer / 30797241313
91%

Build:
DEFAULT BRANCH: main
Ran 03 Aug 2026 08:28AM UTC
Jobs 3
Files 131
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

03 Aug 2026 08:23AM UTC coverage: 91.248% (+0.1%) from 91.142%
30797241313

push

github

web-flow
[vc] Reject snapshot request while prior snapshot not CHECKPOINTED (#708)

[vc] Reject snapshot request while prior snapshot not CHECKPOINTED

#### Type of change

- New feature
- Improvement (improvement to code, performance, etc)
- Test update

#### Description

- Gate a new `_snapshot` request in `commitTransactions`, right after
blind-write categorization and before `createSnapshotIfPresent`: look up
the latest `_snapshot` record via a metadata pointer and accept only
when
  it is `CHECKPOINTED` or absent.
- The pointer (metadata key `latest snapshot key`) is pre-seeded (NULL)
at
  DB init alongside `last committed block number`, and updated with the
existing `setMetadataPrepSQLStmt`/`getMetadataPrepSQLStmt` helpers. It
is
set in `database.commit`, right after `writeStatesByGroup` succeeds and
  before `tx.Commit`, so it lands in the same DB transaction as the
  `_snapshot` row it targets and is always consistent with it.
- On rejection, remove the incoming `_snapshot` write from `newWrites`
and
  set `invalidTxStatus`, so the normal status path reports the rejection
  without creating a snapshot database or record:
- `COMPLETED`-but-not-checkpointed -> `REJECTED_SNAPSHOT_NO_CHECKPOINT`
(120)
- any other non-CHECKPOINTED state -> `REJECTED_SNAPSHOT_IN_PROGRESS`
(119)
- A pointer that names a missing row, or a row whose value fails to
decode,
is an invariant violation or storage corruption, not a normal rejection
  outcome -- both are returned as hard errors so the batch fails/retries
  instead of silently masking the anomaly.
- A resubmission (txID already in `tx_status`) bypasses the gate and
keeps
  its committed status via existing duplicate-tx handling.

#### Additional details (Optional)

Bumps `fabric-x-common` to the pseudo-version carrying
`Status_REJECTED_SNAPSHOT_IN_PROGRESS` /
`Status_REJECTED_SNAPSHOT_NO_CHECKPOINT`.
Tested with `make test-all-db` (841 tests) and `make lint`.

#### Related issues

- resolves #707

---------

Signed-off... (continued)

68 of 82 new or added lines in 3 files covered. (82.93%)

12 existing lines in 4 files now uncovered.

10613 of 11631 relevant lines covered (91.25%)

35835.05 hits per line

Uncovered Changes

Lines Coverage ∆ File
10
84.38
0.77% service/vc/snapshot.go
2
86.76
1.5% service/vc/database.go
2
78.57
-1.25% service/vc/validator.go

Coverage Regressions

Lines Coverage ∆ File
5
94.42
-2.15% service/coordinator/coordinator.go
4
95.0
-3.33% mock/coordinator.go
2
81.9
-1.9% service/query/query.go
1
80.23
1.16% service/sidecar/sidecar.go
Jobs
ID Job ID Ran Files Coverage
1 unit-test - 30797241313.1 03 Aug 2026 08:30AM UTC 95
84.57
GitHub Action Run
2 db-test - 30797241313.2 03 Aug 2026 08:28AM UTC 131
79.05
GitHub Action Run
3 core-db-test - 30797241313.3 03 Aug 2026 08:28AM UTC 100
46.89
GitHub Action Run
Source Files on build 30797241313
  • Tree
  • List 131
  • Changed 17
  • Source Changed 0
  • Coverage Changed 17
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • a8e6f08d on github
  • Prev Build on main (#30786723857)
  • Next Build on main (#30811029382)
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