BUGFI: forbid frequent freeze

This commit is contained in:
obdev
2023-05-30 12:47:35 +00:00
committed by ob-robot
parent 65046e8219
commit 102cc87bf9
5 changed files with 18 additions and 3 deletions

View File

@ -170,6 +170,10 @@ public:
bool need_do_writing_throttle() const;
bool check_clock_over_seq(const int64_t seq);
int64_t expected_wait_time(const int64_t seq) const;
int64_t get_max_cached_memstore_size() const
{
return MAX_CACHED_GROUP_COUNT * ATOMIC_LOAD(&nway_) * (PAGE_SIZE + ACHUNK_PRESERVE_SIZE);
}
private:
ObQSync& get_qs() {
static ObQSync s_qs;

View File

@ -149,6 +149,9 @@ public:
int64_t hazard = hlist_.hazard();
return hazard == INT64_MAX? 0: hazard;
}
int64_t get_max_cached_memstore_size() const {
return arena_.get_max_cached_memstore_size();
}
int64_t get_mem_total_memstore_used() const { return arena_.hold(); }
void log_frozen_memstore_info(char* buf, int64_t limit) {
if (NULL != buf && limit > 0) {