masaori335 commented on issue #10296:
URL: 
https://github.com/apache/trafficserver/issues/10296#issuecomment-1734949444

   If I set breakpoint on line 607, it always fail. `markNextHop` and 
`findNextHop` has some race?
   
   
https://github.com/apache/trafficserver/blob/93ac94cb9eed1868887ccb8a50b8fd99737832d9/proxy/http/remap/unit-tests/test_NextHopConsistentHash.cc#L607
   
   ```
   next_hop NextHopConsistentHash.cc:453:findNextHop() [30006] Initial parent 
lookups: 9
   next_hop NextHopConsistentHash.cc:494:findNextHop() [30006] result->result: 
PARENT_SPECIFIED Chosen parent: c5.bar.com.80
   NextHopHealthStatus.cc:128:markNextHop() [30006] NextHop initially marked as 
down (null)
   NextHopHealthStatus.cc:147:markNextHop() [30006] Failure threshold met 
failcount:1 >= threshold:1, http parent proxy c5.bar.com marked down
   next_hop NextHopHealthStatus.cc:149:markNextHop() [30006] NextHop c5.bar.com 
marked unavailable, h->available=false
   Process 8784 stopped
   * thread #1, name = 'test_NextHopCon', stop reason = breakpoint 1.1
       frame #0: 0x0000555555685a02 
test_NextHopConsistentHash`C_A_T_C_H_T_E_S_T_42() at 
test_NextHopConsistentHash.cc:607:19
      604          // seventh request - new request with all hosts down and 
go_direct is false.
      605          result->reset();
      606          build_request(30007, &sm, nullptr, "bunny.net/asset4", 
nullptr);
   -> 607          strategy->findNextHop(txnp);
      608          REQUIRE(result->result == ParentResultType::PARENT_FAIL);
      609          CHECK(result->hostname == nullptr);
      610
   (lldb) c
   Process 8784 resuming
   next_hop NextHopConsistentHash.cc:309:findNextHop() [30007] firstcall, 
line_number: -1, result: PARENT_UNDEFINED
   next_hop NextHopConsistentHash.cc:415:findNextHop() [30007] next hop 
c2.foo.com is now retryable
   next_hop NextHopConsistentHash.cc:453:findNextHop() [30007] Initial parent 
lookups: 1
   next_hop NextHopConsistentHash.cc:494:findNextHop() [30007] result->result: 
PARENT_SPECIFIED Chosen parent: c2.foo.com.80
   
   
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   test_NextHopConsistentHash is a Catch v2.13.8 host application.
   Run with -? for options
   
   
-------------------------------------------------------------------------------
   Scenario: Testing NextHopConsistentHash class (alternating rings), using 
policy
             'consistent_hash'
         Given: Loading the consistent-hash-tests.yaml config for
                'consistent_hash' tests.
          When: requests are made in a config set for alternating rings and 
hosts
                are marked down.
          Then: expect the following results when making requests and marking
                hosts down.
   
-------------------------------------------------------------------------------
   unit-tests/test_NextHopConsistentHash.cc:544
   
...............................................................................
   
   unit-tests/test_NextHopConsistentHash.cc:608: FAILED:
     REQUIRE( result->result == ParentResultType::PARENT_FAIL )
   with expansion:
     2 == 4
   ```  


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

Reply via email to