You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@brpc.apache.org by GitBox <gi...@apache.org> on 2019/04/30 06:39:51 UTC

[GitHub] [incubator-brpc] hairet commented on issue #570: add queue mutex & uid barrel & switch for baidu protocol

hairet commented on issue #570: add queue mutex & uid barrel & switch for baidu protocol
URL: https://github.com/apache/incubator-brpc/pull/570#issuecomment-487835921
 
 
   > 在应用层面解决这个需求有什么缺陷么?bthread层面的改动成本太高了,无法单纯地从code review和单测中判断这些代码的影响面。
   
   由于bthread的调度存在steal,然后IO层入包parse出多个包QueueMessage给多个bthread处理,导致一个问题,同一个tcp前端发来多个包,在svr这边处理的时候会乱序(有些业务有排队需求)
   业务层不太好做排序,因为乱序来自好几个地方,特别明显的就是我前面说的OnNewMessages->QueueMessage那里。
   
   我暂时只能通过单测,以及明显代码级别不影响老代码(即整个串行化开关是纯新代码)来保证安全,还有一大部分代码没有提交。我晚点经过实战验证,再把相关代码做干净的整理提PR吧

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For additional commands, e-mail: dev-help@brpc.apache.org