Skip to content

Commit

Permalink
Merge pull request #13280 from rockwotj/comments
Browse files Browse the repository at this point in the history
Add comments about which stm_snapshot backend to use
  • Loading branch information
rockwotj authored Sep 6, 2023
2 parents bfde4a1 + c950554 commit fe993e1
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/v/cluster/persisted_stm.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,10 @@ struct stm_snapshot {
}
};

// stm_snapshots powered by a seperate file on disk.
//
// This is the default backend for stm_snapshots and works well when
// there are very few partitions (ie for internal topics).
class file_backed_stm_snapshot {
public:
file_backed_stm_snapshot(
Expand All @@ -81,6 +85,11 @@ class file_backed_stm_snapshot {
size_t _snapshot_size{0};
};

// stm_snapshots powered by the kvstore.
//
// This backend is recommended when it's possible there will be many partitions
// for a given stm, as the alternative (files) does not scale well with many
// partitions.
class kvstore_backed_stm_snapshot {
public:
kvstore_backed_stm_snapshot(
Expand Down

0 comments on commit fe993e1

Please sign in to comment.