[MDS] add mds construct sequence to bind async executed DAG and mds_table
This commit is contained in:
@ -387,7 +387,7 @@ void TestMdsTable::test_flush() {
|
||||
OB_ASSERT(idx < 10);
|
||||
MDS_LOG(INFO, "print dump node kv", K(kv));
|
||||
return OB_SUCCESS;
|
||||
}, true)
|
||||
}, 0, true)
|
||||
);
|
||||
mds_table_.on_flush(mock_scn(199), OB_SUCCESS);// 3. 推大rec_scn【至少】到200
|
||||
share::SCN rec_scn;
|
||||
@ -518,7 +518,7 @@ TEST_F(TestMdsTable, test_recycle) {
|
||||
ASSERT_EQ(OB_SUCCESS, mds_table_.flush(mock_scn(20000)));
|
||||
mds_table_.for_each_unit_from_small_key_to_big_from_old_node_to_new_to_dump([](const MdsDumpKV &){
|
||||
return OB_SUCCESS;
|
||||
}, true);
|
||||
}, 0, true);
|
||||
mds_table_.on_flush(mock_scn(20000), OB_SUCCESS);
|
||||
share::SCN rec_scn;
|
||||
ASSERT_EQ(OB_SUCCESS, mds_table_.get_rec_scn(rec_scn));
|
||||
|
@ -68,7 +68,7 @@ int MdsTableBase::get_ls_max_consequent_callbacked_scn_(share::SCN &max_conseque
|
||||
return OB_SUCCESS;
|
||||
}
|
||||
|
||||
int MdsTableBase::merge(const share::SCN &flushing_scn)
|
||||
int MdsTableBase::merge(const int64_t construct_sequence, const share::SCN &flushing_scn)
|
||||
{
|
||||
MOCK_FLUSHING_SCN = flushing_scn;
|
||||
return OB_SUCCESS;
|
||||
@ -164,7 +164,7 @@ TEST_F(TestMdsTableFlush, normal_flush) {
|
||||
ASSERT_EQ(OB_SUCCESS, handle.for_each_unit_from_small_key_to_big_from_old_node_to_new_to_dump([&scan_cnt](const MdsDumpKV &kv) -> int {
|
||||
scan_cnt++;
|
||||
return OB_SUCCESS;
|
||||
}, true));
|
||||
}, 0, true));
|
||||
ASSERT_EQ(1, scan_cnt);
|
||||
handle.on_flush(MOCK_FLUSHING_SCN, OB_SUCCESS);
|
||||
ASSERT_EQ(OB_SUCCESS, handle.get_rec_scn(rec_scn));
|
||||
@ -190,7 +190,7 @@ TEST_F(TestMdsTableFlush, normal_flush) {
|
||||
ASSERT_EQ(OB_SUCCESS, handle.for_each_unit_from_small_key_to_big_from_old_node_to_new_to_dump([&scan_cnt](const MdsDumpKV &kv) -> int {
|
||||
scan_cnt++;
|
||||
return OB_SUCCESS;
|
||||
}, true));
|
||||
}, 0, true));
|
||||
ASSERT_EQ(1, scan_cnt);
|
||||
handle.on_flush(MOCK_FLUSHING_SCN, OB_SUCCESS);
|
||||
ASSERT_EQ(OB_SUCCESS, handle.get_rec_scn(rec_scn));
|
||||
@ -207,7 +207,7 @@ TEST_F(TestMdsTableFlush, normal_flush) {
|
||||
ASSERT_EQ(OB_SUCCESS, handle.for_each_unit_from_small_key_to_big_from_old_node_to_new_to_dump([&scan_cnt](const MdsDumpKV &kv) -> int {
|
||||
scan_cnt++;
|
||||
return OB_SUCCESS;
|
||||
}, true));
|
||||
}, 0, true));
|
||||
ASSERT_EQ(2, scan_cnt);
|
||||
handle.on_flush(MOCK_FLUSHING_SCN, OB_SUCCESS);
|
||||
ASSERT_EQ(OB_SUCCESS, handle.get_rec_scn(rec_scn));
|
||||
|
Reference in New Issue
Block a user