fix mittest test_ob_simple_cluster coredump
This commit is contained in:
3
deps/oblib/src/rpc/frame/ob_net_easy.cpp
vendored
3
deps/oblib/src/rpc/frame/ob_net_easy.cpp
vendored
@ -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));
|
||||
|
||||
2
deps/oblib/src/rpc/obrpc/ob_listener.cpp
vendored
2
deps/oblib/src/rpc/obrpc/ob_listener.cpp
vendored
@ -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);
|
||||
|
||||
1
deps/oblib/src/rpc/obrpc/ob_net_client.cpp
vendored
1
deps/oblib/src/rpc/obrpc/ob_net_client.cpp
vendored
@ -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;
|
||||
}
|
||||
|
||||
|
||||
3
deps/oblib/src/rpc/pnio/interface/group.c
vendored
3
deps/oblib/src/rpc/pnio/interface/group.c
vendored
@ -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;
|
||||
|
||||
Reference in New Issue
Block a user