MCPcopy
hub / github.com/etcd-io/bbolt / validateIncrementalTxid

Function validateIncrementalTxid

concurrent_test.go:693–704  ·  view source on GitHub ↗
(rs historyRecords)

Source from the content-addressed store, hash-verified

691}
692
693func validateIncrementalTxid(rs historyRecords) error {
694 lastTxid := rs[0].Txid
695
696 for i := 1; i < len(rs); i++ {
697 if rs[i].Txid < lastTxid {
698 return fmt.Errorf("detected non-incremental txid(%d, %d) in %s mode", lastTxid, rs[i].Txid, rs[i].OperationType)
699 }
700 lastTxid = rs[i].Txid
701 }
702
703 return nil
704}
705
706func validateSequential(rs historyRecords) error {
707 sort.Stable(rs)

Callers 1

runWorkerFunction · 0.85

Calls 1

ErrorfMethod · 0.65

Tested by

no test coverage detected