From eb5068370ae7703ead61730a7c13173d0c7fcff2 Mon Sep 17 00:00:00 2001 From: obdev Date: Wed, 31 May 2023 11:41:45 +0000 Subject: [PATCH] BUGFIX: update slog will create ls if not exist --- src/storage/tx_storage/ob_ls_service.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/storage/tx_storage/ob_ls_service.cpp b/src/storage/tx_storage/ob_ls_service.cpp index 7c4b76698..b9ede3710 100644 --- a/src/storage/tx_storage/ob_ls_service.cpp +++ b/src/storage/tx_storage/ob_ls_service.cpp @@ -556,8 +556,10 @@ int ObLSService::replay_update_ls(const ObLSMeta &ls_meta) } else if (OB_FAIL(check_ls_exist(ls_meta.ls_id_, ls_is_existed))) { LOG_WARN("fail to check log stream existence", K(ret), K(ls_meta)); } else if (!ls_is_existed) { - ret = OB_LS_NOT_EXIST; - LOG_WARN("ls not exit", K(ret), K(ls_meta)); + LOG_WARN("ls not exit, update will create a new one", K(ls_meta)); + if (OB_FAIL(replay_create_ls_(ls_meta))) { + LOG_WARN("fail to create ls for replay", K(ret), K(ls_meta)); + } } else if (OB_FAIL(replay_update_ls_(ls_meta))) { LOG_WARN("fail to update ls for replay", K(ret), K(ls_meta)); }