Bright Chen
Bright Chen
> @vinllen 可以看看#2797 CC @vinllen
@wwbmmm 有设计方案吗?
```shell bthread1 bthread2 bthread_sem_timedwait rwlock->reader_count->fetch_add(RWLockMaxReaders); bthread_sem_post_n bthread_mutex_unlock rwlock->reader_count->fetch_add ``` In this case, `reader_sema` has been posted. Subsequently, there may be a problem where the write lock and read lock enter...
bRPC的TCP逻辑基本上是封装在brpc::Socket内,可以先尝试将brpc::Socket内TCP逻辑替换为QUIC。此外,EventDispatcher封装了IO多路复用逻辑。
> 问题总结,因为在发送端产生的recv completion event和send completion event的时机不一致,导致接收端产生回复ACK的时候,send completion event可能还没有产生,所以申请sqe的时候就可能失败。 可以让recv completion event和send completion event的产生时机是一致的,这样能保证接收端回复ACK的时候,发送端一定有send completion event产生。 @yanglimingcn solicited && signaled send wc完成之前的send wc被server poll到之后ack,client收到的recv cqe,排在signaled send cqe前面,还是有问题吧?server使用polling模式时,这种情况很容易出现吧。
> [E1008]Reached timeout=60000ms @Socket{id=13 fd=1160 addr=xxx:xx} (0x0x7f957c964ec0) rdma info={rdma_state=ON, handshake_state=ESTABLISHED, rdma_remote_rq_window_size=63, rdma_sq_window_size=0, rdma_local_window_capacity=125, rdma_remote_window_capacity=125, rdma_sbuf_head=57, rdma_sbuf_tail=120, rdma_rbuf_head=36, rdma_unacked_rq_wr=0, rdma_received_ack=0, rdma_unsolicited_sent=0, rdma_unsignaled_sq_wr=1, rdma_new_rq_wrs=0, } 我们使用rdma_sq_window_size来表示本地SQ大小,遇到这样的case:rdma_sq_window_size是0,似乎是一直没poll到IBV_WC_SEND WC。超时后重试多次也还是超时,此时数据已经发不出去了。 原因应该是:solicited_only=1时,IBV_WC_SEND WC不会生成CQE。如果没有IBV_WC_RECV CEQ触发comp channel事件,就没法poll到IBV_WC_SEND WC,更新rdma_sq_window_size。...
> 本端的IBV_SEND_SOLICITED设置后影响的应当是对端是否在comp channel上生成一个event以触发poll_cq,这个问题看起来是本端一直没有event产生,导致没法进入poll_cq流程? 是的,问题是本端没有send CQE产生。 [Solicited Event文档](https://www.rdmamojo.com/2014/05/27/solicited-event/)提到,IBV_SEND_SOLICITED是在对端的comp channel的生成event。我测过,本端是没有event的,所以不会PollCq。 我理解,当前实现是在对端设置了IBV_SEND_SOLICITED后,触发本端进入PollCq,将这之前的的IBV_WC_SEND顺便poll出来。
> 由对端应用层发送立即数 ACK 来通知本端 poll cq, 每 1/4 窗口发送一个 signaled + solicited 的 wr, 对端收到 1/4 窗口个的消息后给本端发一个signaled + solicited wr 作为 ACK 通知本端 poll cq。当本端 poll 到 IBV_SEND_SIGNALED wr 产生的...
If the Redis inline protocol cannot clearly identify the protocol, we can treat the Redis inline protocol as a new protocol and put it at the end of ProtocolType, so...
socket只有会健康检查成功后才能继续使用,否则该socket不会被使用的,即会选择其他节点发起RPC。 第一张图是健康检查时连接超时的日志,并不是发起RPC的。