BUGFIX: write throttle sleep as expected after freeze
This commit is contained in:
@ -47,6 +47,7 @@ ObStorageTableGuard::ObStorageTableGuard(
|
||||
for_multi_source_data_(for_multi_source_data)
|
||||
{
|
||||
init_ts_ = ObTimeUtility::current_time();
|
||||
get_thread_alloc_stat() = 0;
|
||||
}
|
||||
|
||||
ObStorageTableGuard::~ObStorageTableGuard()
|
||||
@ -122,6 +123,11 @@ ObStorageTableGuard::~ObStorageTableGuard()
|
||||
has_sleep = true;
|
||||
need_sleep = memstore_allocator->need_do_writing_throttle();
|
||||
}
|
||||
const int64_t finish_clock = memstore_allocator->get_clock();
|
||||
if (finish_clock < seq) { // we has skip some time, need make the clock skip too.
|
||||
const int64_t skip_clock = MIN(seq - finish_clock, get_thread_alloc_stat());
|
||||
memstore_allocator->skip_clock(skip_clock);
|
||||
}
|
||||
}
|
||||
|
||||
if (REACH_TIME_INTERVAL(100 * 1000L) &&
|
||||
|
||||
Reference in New Issue
Block a user