[ https://issues.apache.org/jira/browse/TUBEMQ-354?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Guocheng Zhang updated TUBEMQ-354: ---------------------------------- Description: like below code: If the updMasterAddrByDns() is called concurrently, it is likely to be overwritten. The function should only set the content of this translation, not in the overwrite mode. https://github.com/apache/incubator-tubemq/blob/master/tubemq-client-twins/tubemq-client-cpp/src/client_service.cc#L278 !image-2020-09-16-10-25-36-558.png! And all dns translation operations should be performed under dns_mutex_ instead of mutex_ was: like below code: If the updMasterAddrByDns() is called concurrently, it is likely to be overwritten. The function should only set the content of this translation, not in the overwrite mode. https://github.com/apache/incubator-tubemq/blob/master/tubemq-client-twins/tubemq-client-cpp/src/client_service.cc#L278 !image-2020-09-16-10-25-36-558.png! > Found a dns translate bug in C/C++ sdk > -------------------------------------- > > Key: TUBEMQ-354 > URL: https://issues.apache.org/jira/browse/TUBEMQ-354 > Project: Apache TubeMQ > Issue Type: Bug > Reporter: Guocheng Zhang > Priority: Major > Attachments: image-2020-09-16-10-25-36-558.png > > > like below code: > If the updMasterAddrByDns() is called concurrently, it is likely to be > overwritten. The function should only set the content of this translation, > not in the overwrite mode. > https://github.com/apache/incubator-tubemq/blob/master/tubemq-client-twins/tubemq-client-cpp/src/client_service.cc#L278 > !image-2020-09-16-10-25-36-558.png! > And all dns translation operations should be performed under dns_mutex_ > instead of mutex_ -- This message was sent by Atlassian Jira (v8.3.4#803005)