fix and enable sensitive_test
This commit is contained in:
parent
7d85173367
commit
797cc6f3bc
12
deps/oblib/src/lib/allocator/ob_qsync.h
vendored
12
deps/oblib/src/lib/allocator/ob_qsync.h
vendored
@ -104,16 +104,20 @@ protected:
|
||||
int64_t ref_num_;
|
||||
};
|
||||
|
||||
class ObQSync : public ObQSyncImpl
|
||||
template<int64_t MAX_REF_CNT>
|
||||
class ObQSyncWrapper : public ObQSyncImpl
|
||||
{
|
||||
public:
|
||||
enum { MAX_REF_CNT = 256 };
|
||||
ObQSync() : ObQSyncImpl(local_ref_array_, MAX_REF_CNT) {}
|
||||
virtual ~ObQSync() {}
|
||||
ObQSyncWrapper() : ObQSyncImpl(local_ref_array_, MAX_REF_CNT) {}
|
||||
virtual ~ObQSyncWrapper() {}
|
||||
private:
|
||||
Ref local_ref_array_[MAX_REF_CNT];
|
||||
};
|
||||
|
||||
class ObQSync : public ObQSyncWrapper<256>
|
||||
{
|
||||
};
|
||||
|
||||
struct QSyncCriticalGuard
|
||||
{
|
||||
explicit QSyncCriticalGuard(ObQSync& qsync): qsync_(qsync), ref_(qsync.acquire_ref()) {}
|
||||
|
5
deps/oblib/src/lib/lock/ob_qsync_lock.cpp
vendored
5
deps/oblib/src/lib/lock/ob_qsync_lock.cpp
vendored
@ -18,12 +18,13 @@ namespace common
|
||||
{
|
||||
int ObQSyncLock::init(const lib::ObMemAttr &mem_attr)
|
||||
{
|
||||
return qsync_.init(mem_attr);
|
||||
UNUSED(mem_attr);
|
||||
return OB_SUCCESS;
|
||||
}
|
||||
|
||||
void ObQSyncLock::destroy()
|
||||
{
|
||||
qsync_.destroy();
|
||||
// do nothing
|
||||
}
|
||||
|
||||
int ObQSyncLock::rdlock()
|
||||
|
5
deps/oblib/src/lib/lock/ob_qsync_lock.h
vendored
5
deps/oblib/src/lib/lock/ob_qsync_lock.h
vendored
@ -26,7 +26,7 @@ public:
|
||||
ObQSyncLock() : write_flag_(0) {}
|
||||
~ObQSyncLock() {}
|
||||
int init(const lib::ObMemAttr &mem_attr);
|
||||
bool is_inited() const { return qsync_.is_inited(); }
|
||||
bool is_inited() const { return true; }
|
||||
void destroy();
|
||||
int rdlock();
|
||||
void rdunlock();
|
||||
@ -36,9 +36,10 @@ public:
|
||||
int try_rdlock();
|
||||
private:
|
||||
static const int64_t TRY_SYNC_COUNT = 16;
|
||||
static const int64_t MAX_REF_CNT = 48;
|
||||
private:
|
||||
int64_t write_flag_ CACHE_ALIGNED;
|
||||
common::ObDynamicQSync qsync_;
|
||||
common::ObQSyncWrapper<MAX_REF_CNT> qsync_;
|
||||
};
|
||||
|
||||
class ObQSyncLockWriteGuard
|
||||
|
@ -186,7 +186,7 @@ private:
|
||||
ObArray<ScheduleInfo> schedule_infos_;
|
||||
};
|
||||
|
||||
const int64_t GroupIoStatusStringLength = 256;
|
||||
const int64_t GroupIoStatusStringLength = 128;
|
||||
const int64_t KBYTES = 1024;
|
||||
const int64_t MBYTES = 1024 * KBYTES;
|
||||
const int64_t GBYTES = 1024 * MBYTES;
|
||||
|
Loading…
x
Reference in New Issue
Block a user