mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
Adding optional revision bump and mark compacted to snapshot restore
Signed-off-by: Allen Ray <alray@redhat.com> Signed-off-by: Thomas Jungblut <tjungblu@redhat.com>
This commit is contained in:
@@ -35,3 +35,9 @@ func WriteKV(be backend.Backend, kv mvccpb.KeyValue) {
|
||||
be.BatchTx().UnsafePut(buckets.Key, ibytes, d)
|
||||
be.BatchTx().Unlock()
|
||||
}
|
||||
|
||||
func UnsafeSetScheduledCompact(tx backend.BatchTx, value int64) {
|
||||
rbytes := newRevBytes()
|
||||
revToBytes(revision{main: value}, rbytes)
|
||||
tx.UnsafePut(buckets.Meta, scheduledCompactKeyName, rbytes)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user