-
Notifications
You must be signed in to change notification settings - Fork 411
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
Integrate some functions in KVStore and rename them to what they actually do #7402
Changes from all commits
ce93bb6
4eb7f47
aaf4c29
61b28e1
2f8ecd8
49fdab8
7947cda
292f16d
a25b21b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||
---|---|---|---|---|
|
@@ -159,9 +159,15 @@ class RegionTable : private boost::noncopyable | |||
|
||||
void removeRegion(RegionID region_id, bool remove_data, const RegionTaskLock &); | ||||
|
||||
// Find all regions with data, call writeBlockByRegionAndFlush with try_persist = true. | ||||
// This function is only for debug. | ||||
bool tryFlushRegions(); | ||||
RegionDataReadInfoList tryFlushRegion(RegionID region_id, bool try_persist = false); | ||||
RegionDataReadInfoList tryFlushRegion(const RegionPtrWithBlock & region, bool try_persist); | ||||
|
||||
// Protects writeBlockByRegionAndFlush and ensures it's executed by only one thread at the smae time. | ||||
// Only one thread can do this at the same time. | ||||
// The original name for this function is tryFlushRegion. | ||||
RegionDataReadInfoList tryWriteBlockByRegionAndFlush(RegionID region_id, bool try_persist = false); | ||||
RegionDataReadInfoList tryWriteBlockByRegionAndFlush(const RegionPtrWithBlock & region, bool try_persist); | ||||
|
||||
void handleInternalRegionsByTable(KeyspaceID keyspace_id, TableID table_id, std::function<void(const InternalRegions &)> && callback) const; | ||||
std::vector<std::pair<RegionID, RegionPtr>> getRegionsByTable(KeyspaceID keyspace_id, TableID table_id) const; | ||||
|
@@ -191,7 +197,6 @@ class RegionTable : private boost::noncopyable | |||
/// extend range for possible InternalRegion or add one. | ||||
void extendRegionRange(RegionID region_id, const RegionRangeKeys & region_range_keys); | ||||
|
||||
|
||||
void updateSafeTS(UInt64 region_id, UInt64 leader_safe_ts, UInt64 self_safe_ts); | ||||
|
||||
// unit: ms. If safe_ts diff is larger than 2min, we think the data synchronization progress is far behind the leader. | ||||
|
@@ -211,7 +216,10 @@ class RegionTable : private boost::noncopyable | |||
InternalRegion & insertRegion(Table & table, const Region & region); | ||||
InternalRegion & doGetInternalRegion(KeyspaceTableID ks_tb_id, RegionID region_id); | ||||
|
||||
RegionDataReadInfoList flushRegion(const RegionPtrWithBlock & region, bool try_persist) const; | ||||
// Try write the committed kvs into cache of columnar DeltaMergeStore. | ||||
// Flush the cache if try_persist is set to true. | ||||
// The original name for this method is flushRegion. | ||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think we don't need to keep this message... it doesn't help |
||||
RegionDataReadInfoList writeBlockByRegionAndFlush(const RegionPtrWithBlock & region, bool try_persist) const; | ||||
bool shouldFlush(const InternalRegion & region) const; | ||||
RegionID pickRegionToFlush(); | ||||
|
||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.