fix ObS3Client lock timeout parameter

This commit is contained in:
obdev 2024-12-17 20:48:50 +00:00 committed by ob-robot
parent 2c236c259a
commit aff7815096

View File

@ -296,7 +296,8 @@ bool ObS3Client::is_stopped() const
bool ObS3Client::try_stop(const int64_t timeout)
{
bool is_stopped = true;
if (OB_SUCCESS == lock_.wrlock(timeout)) {
const int64_t abs_timeout_us = ObTimeUtility::current_time() + timeout;
if (OB_SUCCESS == lock_.wrlock(abs_timeout_us)) {
if (is_inited_) {
const int64_t cur_time_us = ObTimeUtility::current_time();
if (ref_cnt_ <= 0