pulsar-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] lovelle opened a new pull request #3581: Fix thread safety violation on ProducerImpl
Date Tue, 12 Feb 2019 11:26:42 GMT
lovelle opened a new pull request #3581: Fix thread safety violation on ProducerImpl
URL: https://github.com/apache/pulsar/pull/3581
 
 
   ### Motivation
   
   Using static analyzers reports thread safety violation on fields in
   ProducerImpl.OpSendMsg being written and read by different threads.
   
   ### Modifications
   
     - Whenever possible favour final fields, change `createProducerTimeout`,
       `msgCrypto` and `keyGeneratorTask` to final.
     - Fix possible race using `msgIdGenerator` setting its new value if it was 0,
       instead, use CAS semantics for update its value if it has zero value.
     - Change OpSendMsg fields to volatile reported by static analyzers.
   
   ### Verifying this change
   
   - [ ] Make sure that the change passes the CI checks.
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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

Mime
View raw message