[BUG] add row latch when log sync failed

This commit is contained in:
obdev
2023-01-28 17:00:18 +08:00
committed by ob-robot
parent da8c498599
commit 06b882fa75
7 changed files with 33 additions and 3 deletions

View File

@ -654,6 +654,20 @@ public:
tcp_keepintvl_ = tcp_keepintvl;
tcp_keepcnt_ = tcp_keepcnt;
}
void close_all_fd() {
if (lfd_ > 0) {
IGNORE_RETURN epoll_ctl(epfd_, EPOLL_CTL_DEL, lfd_, NULL);
close(lfd_);
lfd_ = -1;
}
ObDLink* head = all_list_.head();
ObLink* cur = head->next_;
while (cur != head) {
ObSqlSock* s = CONTAINER_OF(cur, ObSqlSock, all_list_link_);
cur = cur->next_;
s->do_close();
}
}
private:
void handle_epoll_event() {
const int maxevents = 512;
@ -937,6 +951,9 @@ void ObSqlNio::run(int64_t idx)
while(!has_set_stop()) {
impl_[idx].do_work();
}
if (has_set_stop()) {
impl_[idx].close_all_fd();
}
}
}