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

hyperledger / fabric-x-committer / 30797241313 / 2
91%
main: 91%

Build:
DEFAULT BRANCH: main
Ran 03 Aug 2026 08:30AM UTC
Files 131
Run time 5s
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: 79.047% (-0.08%) from 79.124%
30797241313.2

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)

9194 of 11631 relevant lines covered (79.05%)

34990.23 hits per line

Source Files on job db-test - 30797241313.2
  • Tree
  • List 131
  • Changed 16
  • Source Changed 0
  • Coverage Changed 16
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 30797241313
  • a8e6f08d on github
  • Prev Job for on main (#30786723857.1)
  • Next Job for on main (#30811029382.1)
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