[temp solution] return OB_TABLET_NOT_EXIST when transfer out tx has not committed yet
This commit is contained in:
@ -235,7 +235,8 @@ TEST_F(TestTabletStatusCache, get_transfer_out_tablet)
|
|||||||
// mode is READ_READABLE_COMMITED, can not get tablet
|
// mode is READ_READABLE_COMMITED, can not get tablet
|
||||||
ret = ObTabletCreateDeleteHelper::check_and_get_tablet(key, tablet_handle, 1 * 1000 * 1000/*timeout_us*/,
|
ret = ObTabletCreateDeleteHelper::check_and_get_tablet(key, tablet_handle, 1 * 1000 * 1000/*timeout_us*/,
|
||||||
ObMDSGetTabletMode::READ_READABLE_COMMITED, ObTransVersion::MAX_TRANS_VERSION/*snapshot*/);
|
ObMDSGetTabletMode::READ_READABLE_COMMITED, ObTransVersion::MAX_TRANS_VERSION/*snapshot*/);
|
||||||
ASSERT_EQ(OB_SCHEMA_EAGAIN, ret);
|
//ASSERT_EQ(OB_SCHEMA_EAGAIN, ret);
|
||||||
|
ASSERT_EQ(OB_TABLET_NOT_EXIST, ret);
|
||||||
ASSERT_TRUE(!tablet->tablet_status_cache_.is_valid());
|
ASSERT_TRUE(!tablet->tablet_status_cache_.is_valid());
|
||||||
|
|
||||||
// mode is READ_ALL_COMMITED, allow to get TRANSFER_OUT status tablet
|
// mode is READ_ALL_COMMITED, allow to get TRANSFER_OUT status tablet
|
||||||
|
|||||||
@ -208,7 +208,8 @@ int ObTabletCreateDeleteHelper::check_read_snapshot_by_transfer_scn(
|
|||||||
|
|
||||||
if (!is_committed) {
|
if (!is_committed) {
|
||||||
if (snapshot > transfer_scn) {
|
if (snapshot > transfer_scn) {
|
||||||
ret = OB_SCHEMA_EAGAIN;
|
// TODO(@bowen.gbw): temp solution
|
||||||
|
ret = OB_TABLET_NOT_EXIST;
|
||||||
LOG_WARN("read snapshot is bigger than transfer scn, should retry", K(ret), K(snapshot), K(transfer_scn));
|
LOG_WARN("read snapshot is bigger than transfer scn, should retry", K(ret), K(snapshot), K(transfer_scn));
|
||||||
}
|
}
|
||||||
} else if (is_committed) {
|
} else if (is_committed) {
|
||||||
|
|||||||
Reference in New Issue
Block a user