zchuango commented on code in PR #3471:
URL: https://github.com/apache/brpc/pull/3471#discussion_r3835774450


##########
src/brpc/ubshm/ub_endpoint.cpp:
##########
@@ -840,40 +839,39 @@ int UBShmEndpoint::PollingModeInitialize(bthread_tag_t 
tag,
         std::unique_ptr<FnArgs> args(static_cast<FnArgs*>(p));
         auto poller = args->poller;
         auto running = args->running;
-        std::unordered_set<CqSidOp, CqSidOpHash, CqSidOpEqual> cq_sids;
-        CqSidOp op;
+        std::unordered_set<PollerSidOp, PollerSidOpHash, PollerSidOpEqual> 
poller_sids;
+        PollerSidOp op;
 
         if (poller->init_fn) {
             poller->init_fn();
         }
         while (running->load(std::memory_order_relaxed)) {
             while (poller->op_queue.Dequeue(op)) {
-                if (op.type == CqSidOp::ADD) {
-                    cq_sids.emplace(op);
-                } else if (op.type == CqSidOp::REMOVE) {
-                    cq_sids.erase(op);
-                    
-                } else if (op.type == CqSidOp::MOD) {
-                    cq_sids.erase(op);
-                    cq_sids.emplace(op);
+                if (op.type == PollerSidOp::ADD) {
+                    poller_sids.emplace(op);
+                } else if (op.type == PollerSidOp::REMOVE) {

Review Comment:
   This behavior predates the current PR, which only renames the related CQ 
identifiers to poller terminology without changing the event-registration 
logic. The ADD/MOD/REMOVE transitions and event-mask handling will be tracked 
and addressed separately.



-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to