Fix rebuild while reboot observer core bug
This commit is contained in:
@ -1230,6 +1230,10 @@ int ObLS::finish_slog_replay()
|
|||||||
// so skip the following steps, otherwise load_ls_inner_tablet maybe encounter error.
|
// so skip the following steps, otherwise load_ls_inner_tablet maybe encounter error.
|
||||||
} else if (OB_FAIL(start())) {
|
} else if (OB_FAIL(start())) {
|
||||||
LOG_WARN("ls can not start to work", K(ret));
|
LOG_WARN("ls can not start to work", K(ret));
|
||||||
|
} else if (ObMigrationStatus::OB_MIGRATION_STATUS_REBUILD == new_migration_status) {
|
||||||
|
if (OB_FAIL(offline_())) {
|
||||||
|
LOG_WARN("failed to offline", K(ret), KPC(this));
|
||||||
|
}
|
||||||
} else if (is_enable_for_restore()) {
|
} else if (is_enable_for_restore()) {
|
||||||
if (OB_FAIL(offline_())) {
|
if (OB_FAIL(offline_())) {
|
||||||
LOG_WARN("failed to offline", K(ret), KPC(this));
|
LOG_WARN("failed to offline", K(ret), KPC(this));
|
||||||
|
|||||||
@ -689,6 +689,7 @@ int ObLSService::enable_replay()
|
|||||||
common::ObSharedGuard<ObLSIterator> ls_iter;
|
common::ObSharedGuard<ObLSIterator> ls_iter;
|
||||||
ObLS *ls = nullptr;
|
ObLS *ls = nullptr;
|
||||||
share::ObLSRestoreStatus restore_status;
|
share::ObLSRestoreStatus restore_status;
|
||||||
|
ObMigrationStatus migration_status = ObMigrationStatus::OB_MIGRATION_STATUS_MAX;
|
||||||
if (OB_FAIL(get_ls_iter(ls_iter, ObLSGetMod::TXSTORAGE_MOD))) {
|
if (OB_FAIL(get_ls_iter(ls_iter, ObLSGetMod::TXSTORAGE_MOD))) {
|
||||||
LOG_WARN("failed to get ls iter", K(ret));
|
LOG_WARN("failed to get ls iter", K(ret));
|
||||||
} else {
|
} else {
|
||||||
@ -702,6 +703,10 @@ int ObLSService::enable_replay()
|
|||||||
LOG_ERROR("ls is null", K(ret));
|
LOG_ERROR("ls is null", K(ret));
|
||||||
} else if (ls->is_need_gc()) {
|
} else if (ls->is_need_gc()) {
|
||||||
// this ls will be gc later, should not enable replay
|
// this ls will be gc later, should not enable replay
|
||||||
|
} else if (OB_FAIL(ls->get_migration_status(migration_status))) {
|
||||||
|
LOG_WARN("failed to get ls migration status", K(ret));
|
||||||
|
} else if (ObMigrationStatus::OB_MIGRATION_STATUS_REBUILD == migration_status) {
|
||||||
|
// ls will online in rebuild process
|
||||||
} else if (OB_FAIL(ls->get_restore_status(restore_status))) {
|
} else if (OB_FAIL(ls->get_restore_status(restore_status))) {
|
||||||
LOG_WARN("fail to get ls restore status", K(ret));
|
LOG_WARN("fail to get ls restore status", K(ret));
|
||||||
} else if (!restore_status.can_replay_log()) {
|
} else if (!restore_status.can_replay_log()) {
|
||||||
|
|||||||
Reference in New Issue
Block a user