Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add comments about which stm_snapshot backend to use #13280

Merged
merged 1 commit into from
Sep 6, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions src/v/cluster/persisted_stm.h
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,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 @@ -79,6 +83,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
Loading