Jane He created CASSANDRA-21641:
-----------------------------------

             Summary: Duplicate NativeTransportService.stop() calls in 
CassandraDaemon.destroyClientTransports()
                 Key: CASSANDRA-21641
                 URL: https://issues.apache.org/jira/browse/CASSANDRA-21641
             Project: Apache Cassandra
          Issue Type: Bug
            Reporter: Jane He
            Assignee: Jane He


CassandraDaemon.[destroyClientTransports()|https://github.com/apache/cassandra/blob/b20985d744984304434d2713faa59b4a6f766174/src/java/org/apache/cassandra/service/CassandraDaemon.java#L813-L818]
 first calls {{{}stopNativeTransport(){}}}, which is essentially 
{{{}nativeTransportService.stop(false){}}}, then calls 
{{{}nativeTransportService.destroy(){}}}, which internally calls 
{{nativeTransportService.stop(false)}} , too. So it calls 
{{nativeTransportService.stop(false)}} twice in a row. I believe it's 
introduced from [this merge 
commit|https://github.com/apache/cassandra/commit/42989cee287ddacf30db331829bf927695816966#diff-957f2fa6365cb92f19b74347fee7a9f310a07e32c3112f35196dc17462ec7269].

Although stopping the transport service seems to be idempotent, so stopping it 
twice didn't surface as a bug, still I think we should remove the redundant 
{{stopNativeTransport()}} call, to avoid confusion and the risks of doubling 
the grace period.

As this will be a one-line change, I plan to fix this as a part of the 
CASSANDRA-21191 [PR|https://github.com/apache/cassandra/pull/4953]. 



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

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

Reply via email to