reformat source code
according to code styles, 'AccessModifierOffset' should be -2.
This commit is contained in:
@ -27,7 +27,7 @@ namespace storage {
|
||||
|
||||
class FakePartition;
|
||||
class FakePartitionStorage : public storage::MockObIPartitionStorage {
|
||||
public:
|
||||
public:
|
||||
FakePartitionStorage(FakePartition& holder) : holder_(holder)
|
||||
{}
|
||||
virtual ~FakePartitionStorage()
|
||||
@ -82,12 +82,12 @@ class FakePartitionStorage : public storage::MockObIPartitionStorage {
|
||||
return common::OB_SUCCESS;
|
||||
}
|
||||
|
||||
private:
|
||||
private:
|
||||
FakePartition& holder_;
|
||||
};
|
||||
|
||||
class FakePartition : public storage::MockObIPartition, public blocksstable::ObIBaseStorageLogEntry {
|
||||
public:
|
||||
public:
|
||||
FakePartition() : pmeta_(), smeta_(), arena_(ObModIds::OB_PARTITION_SERVICE), storage_(*this)
|
||||
{}
|
||||
virtual ~FakePartition()
|
||||
@ -114,7 +114,7 @@ class FakePartition : public storage::MockObIPartition, public blocksstable::ObI
|
||||
return pos;
|
||||
}
|
||||
|
||||
public:
|
||||
public:
|
||||
blocksstable::ObPartitionMeta pmeta_;
|
||||
blocksstable::ObSSTableMeta smeta_;
|
||||
ObArenaAllocator arena_;
|
||||
@ -122,7 +122,7 @@ class FakePartition : public storage::MockObIPartition, public blocksstable::ObI
|
||||
};
|
||||
|
||||
class FakePartitionService : public MockObIPartitionService {
|
||||
public:
|
||||
public:
|
||||
FakePartitionService() : partition_list_(), cp_fty_(NULL), arena_(ObModIds::OB_PARTITION_SERVICE)
|
||||
{
|
||||
init();
|
||||
@ -143,7 +143,7 @@ class FakePartitionService : public MockObIPartitionService {
|
||||
virtual int replay_base_storage_log(
|
||||
const int64_t log_seq_num, const int64_t subcmd, const char* buf, const int64_t len, int64_t& pos);
|
||||
|
||||
private:
|
||||
private:
|
||||
ObSEArray<ObIPartitionGroup*, 4096> partition_list_;
|
||||
ObPartitionComponentFactory* cp_fty_;
|
||||
ObArenaAllocator arena_;
|
||||
|
||||
@ -39,18 +39,18 @@ using namespace sql;
|
||||
using namespace transaction;
|
||||
|
||||
class TestTransVersion {
|
||||
public:
|
||||
public:
|
||||
static const int64_t TRANS_VERSION = 1;
|
||||
};
|
||||
class MyIter : public ObStoreRowIterator {
|
||||
public:
|
||||
public:
|
||||
enum IterType {
|
||||
T_INVALID,
|
||||
T_GET,
|
||||
T_SCAN,
|
||||
};
|
||||
|
||||
public:
|
||||
public:
|
||||
MyIter()
|
||||
{
|
||||
clear();
|
||||
@ -62,7 +62,7 @@ class MyIter : public ObStoreRowIterator {
|
||||
inline int set_type(const IterType& type, const ObIArray<common::ObStoreRowkey>* rowkeys = NULL);
|
||||
inline void clear();
|
||||
|
||||
private:
|
||||
private:
|
||||
IterType type_;
|
||||
ObStoreRow row_;
|
||||
const common::ObIArray<common::ObStoreRowkey>* rowkeys_;
|
||||
@ -133,7 +133,7 @@ int MyIter::get_next_row(const ObStoreRow*& row)
|
||||
}
|
||||
|
||||
class MySSStore : public ObIStore {
|
||||
public:
|
||||
public:
|
||||
MySSStore() : allocator_(ObModIds::OB_ST_TEMP, OB_MALLOC_NORMAL_BLOCK_SIZE)
|
||||
{
|
||||
set_version(ObVersion(1));
|
||||
@ -243,7 +243,7 @@ class MySSStore : public ObIStore {
|
||||
return 0;
|
||||
}
|
||||
|
||||
private:
|
||||
private:
|
||||
common::ObArenaAllocator allocator_;
|
||||
ObStoreRow not_exist_row_;
|
||||
};
|
||||
@ -333,7 +333,7 @@ inline int MySSStore::multi_get(const ObStoreCtx& ctx, const ObQueryFlag flag, c
|
||||
}
|
||||
|
||||
class MySchemaService : public oceanbase::share::schema::MockSchemaService {
|
||||
public:
|
||||
public:
|
||||
inline int init(const char* file_name);
|
||||
void get_schema_guard(ObSchemaGetterGuard*& schema_guard)
|
||||
{
|
||||
@ -342,10 +342,10 @@ class MySchemaService : public oceanbase::share::schema::MockSchemaService {
|
||||
// inline virtual int release_schema(const ObSchemaManager *schema);
|
||||
// inline virtual const ObSchemaManager *get_schema_manager_by_version(const int64_t version = 0,
|
||||
// const bool for_merge = false);
|
||||
private:
|
||||
private:
|
||||
// inline virtual const ObSchemaManager *get_user_schema_manager(const int64_t version);
|
||||
// inline virtual int get_all_schema(ObSchemaManager &out_schema, const int64_t frozen_version = -1);
|
||||
private:
|
||||
private:
|
||||
ObRestoreSchema restore_schema_;
|
||||
ObSchemaGetterGuard* schema_guard_;
|
||||
// ObSchemaManager *manager_;
|
||||
@ -394,7 +394,7 @@ int MySchemaService::init(const char* file_name)
|
||||
class TestObSchemaService : public MySchemaService {};
|
||||
|
||||
class MyNewRowIter : public ObNewRowIterator {
|
||||
public:
|
||||
public:
|
||||
MyNewRowIter() : iter_(NULL)
|
||||
{}
|
||||
virtual ~MyNewRowIter()
|
||||
@ -404,7 +404,7 @@ class MyNewRowIter : public ObNewRowIterator {
|
||||
virtual void reset();
|
||||
virtual int get_next_row(ObNewRow*& row);
|
||||
|
||||
private:
|
||||
private:
|
||||
ObStoreRowIterator* iter_;
|
||||
};
|
||||
inline void MyNewRowIter::reset()
|
||||
@ -433,13 +433,13 @@ inline int MyNewRowIter::get_next_row(ObNewRow*& row)
|
||||
|
||||
template <typename T, int64_t ARRAY_SIZE>
|
||||
class TestArray : public ObIArray<T> {
|
||||
public:
|
||||
public:
|
||||
TestArray() : count_(0)
|
||||
{}
|
||||
virtual ~TestArray()
|
||||
{}
|
||||
|
||||
public:
|
||||
public:
|
||||
virtual int push_back(const T& obj);
|
||||
virtual void pop_back()
|
||||
{}
|
||||
@ -478,7 +478,7 @@ class TestArray : public ObIArray<T> {
|
||||
return OB_ERR_UNEXPECTED;
|
||||
}
|
||||
|
||||
private:
|
||||
private:
|
||||
T array_[ARRAY_SIZE];
|
||||
int64_t count_;
|
||||
};
|
||||
@ -525,7 +525,7 @@ const T& TestArray<T, ARRAY_SIZE>::at(int64_t idx) const
|
||||
|
||||
template <typename T>
|
||||
class TestArray2 : public TestArray<T, 1> {
|
||||
public:
|
||||
public:
|
||||
virtual int push_back(const T& obj)
|
||||
{
|
||||
UNUSED(obj);
|
||||
@ -534,7 +534,7 @@ class TestArray2 : public TestArray<T, 1> {
|
||||
};
|
||||
|
||||
class TestPartitionComponentFactory : public ObPartitionComponentFactory {
|
||||
public:
|
||||
public:
|
||||
TestPartitionComponentFactory()
|
||||
{}
|
||||
virtual ~TestPartitionComponentFactory()
|
||||
@ -546,7 +546,7 @@ class TestPartitionComponentFactory : public ObPartitionComponentFactory {
|
||||
};
|
||||
|
||||
class TestObMemtable : public ObMemtable {
|
||||
public:
|
||||
public:
|
||||
virtual int set(const storage::ObStoreCtx& ctx, const uint64_t table_id, const int64_t rowkey_len,
|
||||
const common::ObIArray<share::schema::ObColDesc>& columns, const storage::ObStoreRow& row)
|
||||
{
|
||||
@ -564,7 +564,7 @@ class TestObMemtable : public ObMemtable {
|
||||
};
|
||||
|
||||
class TestObMemtable2 : public ObMemtable {
|
||||
public:
|
||||
public:
|
||||
virtual int set(const storage::ObStoreCtx& ctx, const uint64_t table_id, const int64_t rowkey_len,
|
||||
const common::ObIArray<share::schema::ObColDesc>& columns, const storage::ObStoreRow& row)
|
||||
{
|
||||
@ -592,7 +592,7 @@ class TestObMemtable2 : public ObMemtable {
|
||||
};
|
||||
|
||||
class TestObMemtable3 : public ObMemtable {
|
||||
public:
|
||||
public:
|
||||
TestObMemtable3()
|
||||
{
|
||||
row_.flag_ = ObActionFlag::OP_DEL_ROW;
|
||||
@ -629,12 +629,12 @@ class TestObMemtable3 : public ObMemtable {
|
||||
return ret;
|
||||
}
|
||||
|
||||
private:
|
||||
private:
|
||||
ObStoreRow row_;
|
||||
};
|
||||
|
||||
class TestNewRowIter : public ObNewRowIterator {
|
||||
public:
|
||||
public:
|
||||
inline TestNewRowIter();
|
||||
virtual ~TestNewRowIter()
|
||||
{}
|
||||
@ -642,7 +642,7 @@ class TestNewRowIter : public ObNewRowIterator {
|
||||
{}
|
||||
inline virtual int get_next_row(ObNewRow*& row);
|
||||
|
||||
private:
|
||||
private:
|
||||
ObNewRow row_;
|
||||
};
|
||||
|
||||
|
||||
@ -36,7 +36,7 @@ struct MySubmitLogTask {
|
||||
};
|
||||
|
||||
class MockObClogAdapter : public ObIClogAdapter, public ObSimpleThreadPool {
|
||||
public:
|
||||
public:
|
||||
MockObClogAdapter()
|
||||
{}
|
||||
~MockObClogAdapter()
|
||||
|
||||
@ -18,7 +18,7 @@
|
||||
namespace oceanbase {
|
||||
namespace election {
|
||||
class MockObIElectionMgr : public ObIElectionMgr {
|
||||
public:
|
||||
public:
|
||||
MockObIElectionMgr()
|
||||
{}
|
||||
virtual ~MockObIElectionMgr()
|
||||
@ -69,7 +69,7 @@ class MockObIElectionMgr : public ObIElectionMgr {
|
||||
return common::OB_SUCCESS;
|
||||
}
|
||||
|
||||
public:
|
||||
public:
|
||||
virtual int add_partition(const common::ObPartitionKey& partition, const int64_t replica_num,
|
||||
ObIElectionCallback* election_cb, ObIElection*& election)
|
||||
{
|
||||
@ -114,7 +114,7 @@ class MockObIElectionMgr : public ObIElectionMgr {
|
||||
return common::OB_SUCCESS;
|
||||
}
|
||||
|
||||
public:
|
||||
public:
|
||||
virtual int handle_election_msg(const ObElectionMsgBuffer& msgbuf, obrpc::ObElectionRpcResult& result)
|
||||
{
|
||||
UNUSED(msgbuf);
|
||||
@ -122,7 +122,7 @@ class MockObIElectionMgr : public ObIElectionMgr {
|
||||
return common::OB_SUCCESS;
|
||||
}
|
||||
|
||||
public:
|
||||
public:
|
||||
virtual int set_candidate(const common::ObPartitionKey& partition, const common::ObMemberList& prev_mlist,
|
||||
const common::ObMemberList& curr_mlist)
|
||||
{
|
||||
|
||||
@ -19,7 +19,7 @@
|
||||
namespace oceanbase {
|
||||
namespace unittest {
|
||||
class MockObEndTransCallback : public sql::ObExclusiveEndTransCallback {
|
||||
public:
|
||||
public:
|
||||
virtual int wait()
|
||||
{
|
||||
int res = OB_SUCCESS;
|
||||
@ -44,10 +44,10 @@ class MockObEndTransCallback : public sql::ObExclusiveEndTransCallback {
|
||||
return sql::MOCK_CALLBACK_TYPE;
|
||||
}
|
||||
|
||||
private:
|
||||
private:
|
||||
static const int64_t WAIT_US = 1000 * 1000 * 1000;
|
||||
|
||||
private:
|
||||
private:
|
||||
transaction::ObTransCond cond_;
|
||||
};
|
||||
|
||||
|
||||
@ -24,10 +24,10 @@
|
||||
namespace oceanbase {
|
||||
namespace common {
|
||||
class ObMockIterator : public storage::ObStoreRowIterator {
|
||||
public:
|
||||
public:
|
||||
static const int64_t DEF_ROW_NUM = 512;
|
||||
|
||||
public:
|
||||
public:
|
||||
ObMockIterator(bool reverse = false);
|
||||
virtual ~ObMockIterator();
|
||||
|
||||
@ -183,7 +183,7 @@ class ObMockIterator : public storage::ObStoreRowIterator {
|
||||
return metas_;
|
||||
}
|
||||
|
||||
private:
|
||||
private:
|
||||
void setup_start_cursor();
|
||||
void advance();
|
||||
bool end_of_row() const;
|
||||
@ -199,7 +199,7 @@ class ObMockIterator : public storage::ObStoreRowIterator {
|
||||
|
||||
template <typename T, typename ROW_TYPE>
|
||||
class ObMockRowIterator : public T {
|
||||
public:
|
||||
public:
|
||||
ObMockRowIterator(bool reverse = false) : iter_(reverse)
|
||||
{}
|
||||
virtual ~ObMockRowIterator()
|
||||
@ -272,7 +272,7 @@ class ObMockRowIterator : public T {
|
||||
return bool_ret;
|
||||
}
|
||||
|
||||
private:
|
||||
private:
|
||||
ObMockIterator iter_;
|
||||
};
|
||||
typedef ObMockRowIterator<storage::ObStoreRowIterator, const storage::ObStoreRow> ObMockStoreRowIterator;
|
||||
@ -283,7 +283,7 @@ typedef ObMockRowIterator<common::ObNewRowIterator, common::ObNewRow> ObMockNewR
|
||||
// parse -> parse->header
|
||||
// -> parse->row -> parse_int(parse_varchar..)
|
||||
class ObMockIteratorBuilder {
|
||||
public:
|
||||
public:
|
||||
static const int64_t MAX_DATA_LENGTH = 4096;
|
||||
static const int64_t DEF_COL_NUM = 16;
|
||||
static const int TYPE_NUM = 6;
|
||||
@ -326,7 +326,7 @@ class ObMockIteratorBuilder {
|
||||
|
||||
typedef int (*ObParseFunc)(common::ObIAllocator*, const common::ObString&, storage::ObStoreRow&, int64_t&);
|
||||
|
||||
public:
|
||||
public:
|
||||
ObMockIteratorBuilder() : is_inited_(false), allocator_(NULL), escape_('\\')
|
||||
{}
|
||||
~ObMockIteratorBuilder()
|
||||
@ -337,7 +337,7 @@ class ObMockIteratorBuilder {
|
||||
int parse_with_specified_col_ids(const ObString& str, ObMockIterator& iter, uint16_t* col_id_array_list = nullptr,
|
||||
int64_t* result_col_id_array = nullptr);
|
||||
|
||||
private:
|
||||
private:
|
||||
static int static_init();
|
||||
static int parse_varchar(
|
||||
common::ObIAllocator* allocator, const common::ObString& word, storage::ObStoreRow& row, int64_t& idx);
|
||||
@ -400,10 +400,10 @@ class ObMockIteratorBuilder {
|
||||
}
|
||||
|
||||
// inline bool is_row_end(const common::ObString &word);
|
||||
public:
|
||||
public:
|
||||
static transaction::ObTransID trans_id_list_[TRANS_ID_NUM];
|
||||
|
||||
private:
|
||||
private:
|
||||
static bool is_static_inited_;
|
||||
// hash ObString to obj parse func , such as parse_int ...
|
||||
static common::hash::ObHashMap<common::ObString, ObParseFunc> str_to_obj_parse_func_;
|
||||
@ -417,7 +417,7 @@ class ObMockIteratorBuilder {
|
||||
static common::hash::ObHashMap<common::ObString, uint8_t> str_to_multi_version_row_flag_;
|
||||
static common::hash::ObHashMap<ObString, transaction::ObTransID*> str_to_trans_id_;
|
||||
|
||||
private:
|
||||
private:
|
||||
bool is_inited_;
|
||||
common::ObIAllocator* allocator_;
|
||||
char escape_;
|
||||
@ -426,7 +426,7 @@ class ObMockIteratorBuilder {
|
||||
class MockObNewRowIterator : public ObNewRowIterator {
|
||||
OB_UNIS_VERSION(1);
|
||||
|
||||
public:
|
||||
public:
|
||||
MockObNewRowIterator();
|
||||
~MockObNewRowIterator();
|
||||
static bool equals(const common::ObNewRow& r1, const common::ObNewRow& r2);
|
||||
@ -456,7 +456,7 @@ class MockObNewRowIterator : public ObNewRowIterator {
|
||||
return iter_.add_row(row);
|
||||
}
|
||||
|
||||
private:
|
||||
private:
|
||||
ObMockIterator iter_;
|
||||
common::PageArena<char> allocator_;
|
||||
};
|
||||
|
||||
@ -27,18 +27,18 @@ using namespace common::hash;
|
||||
namespace share {
|
||||
|
||||
class MockObLocationCache : public ObIPartitionLocationCache {
|
||||
public:
|
||||
public:
|
||||
MockObLocationCache()
|
||||
{}
|
||||
virtual ~MockObLocationCache()
|
||||
{}
|
||||
int init();
|
||||
|
||||
public:
|
||||
public:
|
||||
int add(const ObPartitionKey& partition, const ObAddr& leader);
|
||||
int add_overwrite(const ObPartitionKey& partition, const ObAddr& leader);
|
||||
|
||||
public:
|
||||
public:
|
||||
virtual ObIPartitionLocationCache::PartitionLocationCacheType get_type() const
|
||||
{
|
||||
return static_cast<ObIPartitionLocationCache::PartitionLocationCacheType>(PART_LOC_CACHE_TYPE_NORMAL);
|
||||
@ -128,10 +128,10 @@ class MockObLocationCache : public ObIPartitionLocationCache {
|
||||
return common::OB_INVALID_ID;
|
||||
}
|
||||
|
||||
private:
|
||||
private:
|
||||
static const int64_t BUCKET_NUM = 137;
|
||||
|
||||
private:
|
||||
private:
|
||||
ObHashMap<ObPartitionKey, ObAddr> partition_addr_map_;
|
||||
};
|
||||
|
||||
|
||||
@ -27,7 +27,7 @@
|
||||
namespace oceanbase {
|
||||
namespace storage {
|
||||
class MockObIPartitionGroup : public ObIPartitionGroup {
|
||||
public:
|
||||
public:
|
||||
MOCK_METHOD8(init, int(const common::ObPartitionKey& key, ObIPartitionComponentFactory* cp_fty,
|
||||
share::schema::ObMultiVersionSchemaService* schema_service, transaction::ObTransService* txs,
|
||||
replayengine::ObILogReplayEngine* rp_eg, ObPartitionService* ps,
|
||||
|
||||
@ -39,7 +39,7 @@ using namespace blocksstable;
|
||||
namespace storage {
|
||||
|
||||
class MockObIPartitionService : public ObPartitionService {
|
||||
public:
|
||||
public:
|
||||
MOCK_METHOD0(reload_config, int());
|
||||
MOCK_METHOD1(on_leader_revoke, int(const common::ObPartitionKey& partition_key));
|
||||
MOCK_METHOD1(on_leader_takeover, int(const common::ObPartitionKey& partition_key));
|
||||
@ -320,7 +320,7 @@ class MockObIPartitionService : public ObPartitionService {
|
||||
int(const common::ObPartitionKey& pkey, const int64_t schema_version, int64_t& max_commit_version));
|
||||
MOCK_METHOD2(check_ctx_create_timestamp_elapsed, int(const common::ObPartitionKey& pkey, const int64_t ts));
|
||||
|
||||
public:
|
||||
public:
|
||||
ObPartitionGroup mock_pg_;
|
||||
};
|
||||
|
||||
|
||||
@ -21,7 +21,7 @@
|
||||
namespace oceanbase {
|
||||
namespace storage {
|
||||
class MockObIPartitionStorage : public ObIPartitionStorage {
|
||||
public:
|
||||
public:
|
||||
virtual ~MockObIPartitionStorage()
|
||||
{}
|
||||
MOCK_METHOD5(init,
|
||||
|
||||
@ -29,7 +29,7 @@ namespace share {
|
||||
namespace schema {
|
||||
|
||||
class MockObSchemaService : public ObMultiVersionSchemaService {
|
||||
public:
|
||||
public:
|
||||
MockObSchemaService() : schema_guard_(NULL)
|
||||
{}
|
||||
~MockObSchemaService()
|
||||
@ -40,11 +40,11 @@ class MockObSchemaService : public ObMultiVersionSchemaService {
|
||||
// virtual int release_schema(const ObSchemaManager *schema);
|
||||
// virtual int64_t get_latest_local_version(const bool core_schema_version = false) const;
|
||||
// virtual int64_t get_received_broadcast_version(const bool core_schema_version = false) const;
|
||||
private:
|
||||
private:
|
||||
// virtual const ObSchemaManager *get_user_schema_manager(const int64_t version);
|
||||
virtual const ObSchemaGetterGuard* get_schema_guard(const int64_t version);
|
||||
|
||||
private:
|
||||
private:
|
||||
ObRestoreSchema restore_schema_;
|
||||
// ObSchemaManager *manager_;
|
||||
ObSchemaGetterGuard* schema_guard_;
|
||||
|
||||
@ -107,7 +107,7 @@ class MockPartitionServiceVx : public ObPartitionService {
|
||||
namespace common {
|
||||
|
||||
class MockObRsCb : public ObIPartitionReport {
|
||||
public:
|
||||
public:
|
||||
MockObRsCb()
|
||||
{}
|
||||
~MockObRsCb()
|
||||
@ -117,7 +117,7 @@ class MockObRsCb : public ObIPartitionReport {
|
||||
return OB_SUCCESS;
|
||||
}
|
||||
|
||||
public:
|
||||
public:
|
||||
int submit_pt_update_task(const ObPartitionKey& pkey, const bool)
|
||||
{
|
||||
UNUSED(pkey);
|
||||
@ -147,7 +147,7 @@ class MockObRsCb : public ObIPartitionReport {
|
||||
namespace unittest {
|
||||
|
||||
class MockPartitionTableOperator : public ObPartitionTableOperator {
|
||||
public:
|
||||
public:
|
||||
MockPartitionTableOperator(ObIPartPropertyGetter& prop_getter) : ObPartitionTableOperator(prop_getter)
|
||||
{}
|
||||
|
||||
@ -158,7 +158,7 @@ class MockPartitionTableOperator : public ObPartitionTableOperator {
|
||||
};
|
||||
|
||||
class MockRootRpcProxy : public obrpc::ObCommonRpcProxy {
|
||||
public:
|
||||
public:
|
||||
MockRootRpcProxy()
|
||||
{}
|
||||
virtual ~MockRootRpcProxy()
|
||||
@ -182,7 +182,7 @@ class MockRootRpcProxy : public obrpc::ObCommonRpcProxy {
|
||||
};
|
||||
|
||||
class MockObServer {
|
||||
public:
|
||||
public:
|
||||
MockObServer(const ObServerOptions& opts)
|
||||
: is_inited_(false),
|
||||
location_cache_(&location_cache_def_),
|
||||
@ -216,7 +216,7 @@ class MockObServer {
|
||||
int stop();
|
||||
int wait();
|
||||
|
||||
public:
|
||||
public:
|
||||
ObPartitionService* get_partition_service();
|
||||
MockObLocationCache* get_location_cache();
|
||||
ObAddr& get_self()
|
||||
@ -229,13 +229,13 @@ class MockObServer {
|
||||
return restore_schema_.get_schema_guard();
|
||||
}
|
||||
|
||||
protected:
|
||||
protected:
|
||||
bool is_inited_;
|
||||
|
||||
protected:
|
||||
protected:
|
||||
MockObLocationCache* location_cache_;
|
||||
|
||||
protected:
|
||||
protected:
|
||||
ObPartitionComponentFactory partition_cfy_;
|
||||
// MockObSchemaService schema_service_;
|
||||
ObRestoreSchema restore_schema_;
|
||||
@ -258,7 +258,7 @@ class MockObServer {
|
||||
int64_t warm_up_start_time_;
|
||||
int64_t global_last_merged_version_;
|
||||
|
||||
protected:
|
||||
protected:
|
||||
ObServerOptions opts_;
|
||||
ObAddr self_addr_;
|
||||
ObServerConfig& config_;
|
||||
|
||||
@ -35,7 +35,7 @@ struct RpcTask {
|
||||
};
|
||||
|
||||
class MockObTransRpc : public ObITransRpc, public ObSimpleThreadPool {
|
||||
public:
|
||||
public:
|
||||
MockObTransRpc(STMap* st_map)
|
||||
{
|
||||
st_map_ = st_map;
|
||||
@ -116,7 +116,7 @@ class MockObTransRpc : public ObITransRpc, public ObSimpleThreadPool {
|
||||
return ret;
|
||||
}
|
||||
|
||||
public:
|
||||
public:
|
||||
void handle(void* task)
|
||||
{
|
||||
int tmp_ret = 0;
|
||||
@ -134,7 +134,7 @@ class MockObTransRpc : public ObITransRpc, public ObSimpleThreadPool {
|
||||
delete rpc_task;
|
||||
}
|
||||
|
||||
private:
|
||||
private:
|
||||
STMap* st_map_;
|
||||
};
|
||||
|
||||
|
||||
@ -63,13 +63,13 @@ namespace transaction {
|
||||
class KillTransArg;
|
||||
|
||||
class MockObTsMgr : public ObITsMgr {
|
||||
public:
|
||||
public:
|
||||
MockObTsMgr(ObLtsSource& source) : source_(source)
|
||||
{}
|
||||
virtual ~MockObTsMgr()
|
||||
{}
|
||||
|
||||
public:
|
||||
public:
|
||||
virtual int update_gts(const uint64_t tenant_id, const int64_t gts, bool& update)
|
||||
{
|
||||
UNUSED(tenant_id);
|
||||
@ -163,12 +163,12 @@ class MockObTsMgr : public ObITsMgr {
|
||||
return source_.get_gts(stc, NULL, gts, unused);
|
||||
}
|
||||
|
||||
private:
|
||||
private:
|
||||
ObLtsSource& source_;
|
||||
};
|
||||
|
||||
class MockObTransService : public ObTransService {
|
||||
public:
|
||||
public:
|
||||
memtable::ObMemtableCtxFactory mt_ctx_factory_def_;
|
||||
memtable::ObMemtableCtxFactory* mt_ctx_factory_;
|
||||
memtable::ObIMemtableCtx* mt_ctx_;
|
||||
@ -374,7 +374,7 @@ class MockObTransService : public ObTransService {
|
||||
return OB_SUCCESS;
|
||||
}
|
||||
|
||||
public:
|
||||
public:
|
||||
virtual memtable::ObIMemtableCtxFactory* get_mem_ctx_factory()
|
||||
{
|
||||
return mt_ctx_factory_;
|
||||
@ -775,7 +775,7 @@ class MockObTransService : public ObTransService {
|
||||
return OB_SUCCESS;
|
||||
}
|
||||
|
||||
private:
|
||||
private:
|
||||
ObLtsSource lts_source;
|
||||
MockObTsMgr* ts_mgr;
|
||||
};
|
||||
|
||||
@ -33,7 +33,7 @@ class ObStmt;
|
||||
class ObCreateIndexStmt;
|
||||
struct ObResolverParams;
|
||||
class ObRestoreSchema {
|
||||
public:
|
||||
public:
|
||||
ObRestoreSchema();
|
||||
virtual ~ObRestoreSchema() = default;
|
||||
int parse_from_file(const char* filename, share::schema::ObSchemaGetterGuard*& schema_guard);
|
||||
@ -44,14 +44,14 @@ class ObRestoreSchema {
|
||||
// share::schema::ObSchemaManager *get_schema_manager();
|
||||
int init();
|
||||
|
||||
public:
|
||||
public:
|
||||
static const int64_t RESTORE_SCHEMA_VERSION = 1;
|
||||
|
||||
private:
|
||||
private:
|
||||
// disallow copy
|
||||
DISALLOW_COPY_AND_ASSIGN(ObRestoreSchema);
|
||||
|
||||
protected:
|
||||
protected:
|
||||
// function members
|
||||
int do_parse_line(common::ObArenaAllocator& allocator, const char* query);
|
||||
int do_create_table(ObStmt* stmt);
|
||||
@ -61,7 +61,7 @@ class ObRestoreSchema {
|
||||
int add_database_schema(ObDatabaseSchema& database_schema);
|
||||
int add_table_schema(ObTableSchema& table_schema);
|
||||
|
||||
public:
|
||||
public:
|
||||
// data members
|
||||
// share::schema::ObSchemaManager schema_manager_;
|
||||
share::schema::MockSchemaService* schema_service_;
|
||||
|
||||
@ -18,7 +18,7 @@ using namespace oceanbase::common;
|
||||
using namespace oceanbase::unittest;
|
||||
|
||||
class TestObStorage : public ::testing::Test {
|
||||
public:
|
||||
public:
|
||||
virtual void SetUp()
|
||||
{}
|
||||
virtual void TearDown()
|
||||
|
||||
Reference in New Issue
Block a user