fix mittest test_ob_simple_cluster coredump

This commit is contained in:
obdev
2023-03-02 17:25:58 +00:00
committed by ob-robot
parent 5987bcac30
commit e065d29667
4 changed files with 2 additions and 7 deletions

View File

@ -797,9 +797,8 @@ int ObNetEasy::start()
LOG_ERROR("eio is NULL, not inited", K(is_inited_), KP_(rpc_eio), KP_(mysql_eio), KP_(batch_rpc_eio), K(ret));
}
// TODO: rpc_port_ might not in use
global_ob_listener = &rpc_listener_;
if (OB_SUCC(ret) && rpc_port_ > 0) {
global_ob_listener = &rpc_listener_;
if (!global_poc_server.has_start()) {
if (OB_FAIL(rpc_listener_.listen_create(rpc_port_))) {
LOG_ERROR("create listen failed", K(ret));

View File

@ -234,7 +234,6 @@ static int connection_redispatch(int conn_fd, io_threads_pipefd_pool_t *ths_fd_p
{
int ret = OB_SUCCESS;
int wrfd = -1;
int count = ths_fd_pool->count;
int64_t write_bytes = 0;
if (OB_ISNULL(ths_fd_pool)) {
@ -244,6 +243,7 @@ static int connection_redispatch(int conn_fd, io_threads_pipefd_pool_t *ths_fd_p
RPC_LOG(ERROR, "conn_fd invalid", K(conn_fd));
ret = OB_INVALID_ARGUMENT;
} else {
int count = ths_fd_pool->count;
wrfd = ths_fd_pool->pipefd[index % count];
RPC_LOG(INFO, "dipatch", K(conn_fd), K(count), K(index), K(wrfd));
while ((write_bytes = write(wrfd, &conn_fd, sizeof(conn_fd))) < 0 && errno == EINTR);

View File

@ -53,7 +53,6 @@ int ObNetClient::init_(const ObNetOptions opts)
} else if (OB_FAIL(net_.start())) {
LOG_ERROR("Start client network fail", K(ret));
} else {
pn_provision(-1, 1, 1);
inited_ = true;
}

View File

@ -239,9 +239,6 @@ PN_API int pn_provision(int listen_id, int gid, int thread_count)
}
}
pn_grp->count = count;
while(pn_grp->count > thread_count) {
pn_destroy(pn_grp->pn_array[--pn_grp->count]);
}
return pn_grp->count;
el();
return -1;