fix btree core

This commit is contained in:
nroskill
2022-01-05 20:36:49 +08:00
committed by LINxiansheng
parent 8bc16fc202
commit d5a5ed4251
3 changed files with 9 additions and 3 deletions

View File

@ -22,7 +22,7 @@ namespace oceanbase {
namespace common { namespace common {
class QClock { class QClock {
public: public:
enum { MAX_QCLOCK_SLOT_NUM = OB_MAX_CPU_NUM * 32 }; enum { MAX_QCLOCK_SLOT_NUM = OB_MAX_CPU_NUM * 64 };
struct ClockSlot { struct ClockSlot {
ClockSlot() : clock_(UINT64_MAX) ClockSlot() : clock_(UINT64_MAX)
{} {}

View File

@ -504,6 +504,7 @@ public:
void release_ref() void release_ref()
{ {
qclock_.leave_critical(qc_slot_); qclock_.leave_critical(qc_slot_);
qc_slot_ = UINT64_MAX;
} }
OB_INLINE CompHelper& get_comp() OB_INLINE CompHelper& get_comp()
{ {

View File

@ -103,11 +103,16 @@ int alloc_key(BtreeKey*& ret_key, int64_t key)
class FakeAllocator : public ObIAllocator { class FakeAllocator : public ObIAllocator {
public: public:
void* alloc(int64_t size) void *alloc(int64_t size) override
{ {
return ob_malloc(size, attr); return ob_malloc(size, attr);
} }
void free(void* ptr) void* alloc(const int64_t size, const ObMemAttr& attr) override
{
UNUSED(attr);
return alloc(size);
}
void free(void* ptr) override
{ {
ob_free(ptr); ob_free(ptr);
} }