server id persistence

This commit is contained in:
linqiucen
2023-05-12 12:41:17 +00:00
committed by ob-robot
parent e806dd89c3
commit ecdc3d2fde
24 changed files with 177 additions and 173 deletions

View File

@ -352,7 +352,7 @@ int ObPxCoordOp::inner_open()
int ret = OB_SUCCESS;
ObDfo *root_dfo = NULL;
if (OB_FAIL(ObPxReceiveOp::inner_open())) {
} else if (GCTX.server_id_ <= 0) {
} else if (!is_valid_server_id(GCTX.server_id_)) {
ret = OB_SERVER_IS_INIT;
LOG_WARN("Server is initializing", K(ret), K(GCTX.server_id_));
} else if (OB_FAIL(post_init_op_ctx())) {

View File

@ -275,7 +275,7 @@ int ObP2PDatahubManager::generate_p2p_dh_id(int64_t &p2p_dh_id)
// generate p2p dh id
// | <16> | <28> | 20
// server_id timestamp sequence
if (0 >= GCTX.server_id_) {
if (!is_valid_server_id(GCTX.server_id_)) {
ret = OB_SERVER_IS_INIT;
LOG_WARN("server id is unexpected", K(ret));
} else {