Skip to content

Commit 61b5d2f

Browse files
committed
kvserver: use StateEngine for SST snapshot storage
Epic: none Release note: none
1 parent 409cc15 commit 61b5d2f

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

pkg/kv/kvserver/store.go

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1673,12 +1673,9 @@ func NewStore(
16731673
// it can clean it up. If this fails it's not a correctness issue since the
16741674
// storage is also cleared before receiving a snapshot.
16751675
//
1676-
// TODO(sep-raft-log): need a snapshot storage per engine since we'll need to split
1677-
// the SSTs. Or probably we don't need snapshots on the raft SST at all - the reason
1678-
// we use them now is because we want snapshot apply to be completely atomic but that
1679-
// is out the window with two engines, so we may as well break the atomicity in the
1680-
// common case and do something more effective.
1681-
s.sstSnapshotStorage = snaprecv.NewSSTSnapshotStorage(s.TODOEngine(), s.limiters.BulkIOWriteRate)
1676+
// NB: we don't need the snapshot storage in the raft engine. With separated
1677+
// storage, the log engine part of snapshot ingestion is written as a batch.
1678+
s.sstSnapshotStorage = snaprecv.NewSSTSnapshotStorage(s.StateEngine(), s.limiters.BulkIOWriteRate)
16821679
if err := s.sstSnapshotStorage.Clear(); err != nil {
16831680
log.KvDistribution.Warningf(ctx, "failed to clear snapshot storage: %v", err)
16841681
}

0 commit comments

Comments
 (0)