reformat source code

according to code styles, 'AccessModifierOffset' should be -2.
This commit is contained in:
gm
2021-06-16 15:48:42 +08:00
committed by MizuhaHimuraki
parent 8c4a2f26a6
commit 4a92b6d7df
3314 changed files with 23131 additions and 23401 deletions

View File

@ -37,7 +37,7 @@ struct SimpleObPartition : public ObIBaseStorageLogEntry {
static void build(int64_t table_id, int64_t partition_id, int64_t macro_block_cnt, SimpleObPartition& partition);
TO_STRING_EMPTY();
public:
public:
NEED_SERIALIZE_AND_DESERIALIZE;
};
@ -51,7 +51,7 @@ struct SimpleObPartitionNode {
enum SimpleObPartitionOperation { ADD_PARTITION = 0, REMOVE_PARTITION = 1 };
class SimpleObPartitionImage : public ObIRedoModule {
public:
public:
SimpleObPartitionImage();
virtual ~SimpleObPartitionImage();
int init(const char* data_dir, ObBaseStorageLogger* redo_log);
@ -71,7 +71,7 @@ class SimpleObPartitionImage : public ObIRedoModule {
bool operator==(SimpleObPartitionImage& image);
bool operator!=(SimpleObPartitionImage& image);
public:
public:
static const int64_t BUCKET_NUM = 1523;
static int64_t hash(const int64_t table_id, const int64_t partition_id);
int do_add_partition(const SimpleObPartition& partition);

View File

@ -25,7 +25,7 @@ using namespace ::testing;
namespace oceanbase {
namespace blocksstable {
class TestSlogDiskError : public ::testing::Test {
public:
public:
TestSlogDiskError()
{}
virtual ~TestSlogDiskError()
@ -38,7 +38,7 @@ class TestSlogDiskError : public ::testing::Test {
virtual int make_log_ruined(const ObLogCursor& last_log_cursor);
virtual int replay_log();
protected:
protected:
ObLogCursor replay_start_cursor_;
};

View File

@ -24,7 +24,7 @@ using namespace ::testing;
namespace oceanbase {
namespace blocksstable {
class TestStorageLogReaderWriter : public ::testing::Test {
public:
public:
TestStorageLogReaderWriter()
{}
virtual ~TestStorageLogReaderWriter()
@ -499,7 +499,7 @@ TEST_F(TestStorageLogReaderWriter, switch_file_revise)
{
int ret = OB_SUCCESS;
const char LOG_DIR[512] = "./test_storage_log_rw";
const int64_t LOG_FILE_SIZE = 16 * 1024; // 16KB
const int64_t LOG_FILE_SIZE = 16 * 1024; // 16KB
const int64_t CONCURRENT_TRANS_CNT = 8;
const int64_t LOG_BUFFER_SIZE = 1966080L; // 1.875MB
@ -546,14 +546,14 @@ TEST_F(TestStorageLogReaderWriter, switch_file_revise)
int64_t revise_size = 0;
ret = FileDirectoryUtils::get_file_size("./test_storage_log_rw/1", revise_size);
ASSERT_EQ(OB_SUCCESS, ret);
ASSERT_EQ(3 * 4096, revise_size); // truncate last 4k
ASSERT_EQ(3 * 4096, revise_size); // truncate last 4k
}
TEST_F(TestStorageLogReaderWriter, errsim_io_hung)
{
int ret = OB_SUCCESS;
const char LOG_DIR[512] = "./test_storage_log_rw";
const int64_t LOG_FILE_SIZE = 16 * 1024; // 16KB
const int64_t LOG_FILE_SIZE = 16 * 1024; // 16KB
const int64_t CONCURRENT_TRANS_CNT = 8;
const int64_t LOG_BUFFER_SIZE = 1966080L; // 1.875MB