Skip to content

Commit

Permalink
more docs
Browse files Browse the repository at this point in the history
  • Loading branch information
kwannoel committed Jun 9, 2023
1 parent a1e3da4 commit 019a9a3
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/storage/src/hummock/store/state_store.rs
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,16 @@ pub struct LocalHummockStorage {
/// Read handle.
read_version: Arc<RwLock<HummockReadVersion>>,

/// This could be used when `LocalHummockStorage` is used
/// solely for local storage, e.g. when replicating data for executors in different CNs.
/// This indicates that this `LocalHummockStorage` replicates another `LocalHummockStorage`.
/// It's used by executors in different CNs to synchronize states.
///
/// Within `LocalHummockStorage` we use this flag to avoid uploading local state to be
/// persisted, so we won't have duplicate data.
///
/// This also handles a corner case where an executor doing replication
/// is scheduled to the same CN as its Upstream executor.
/// In that case, we use this flag to avoid reading the same data twice,
/// by ignoring the replicated ReadVersion.
is_replicated: bool,

/// Event sender.
Expand Down

0 comments on commit 019a9a3

Please sign in to comment.