You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@accumulo.apache.org by "dlmarion (via GitHub)" <gi...@apache.org> on 2025/06/12 12:52:46 UTC

[I] Enable SharedVariableAtomicityDetector SpotBugs detector [accumulo]

dlmarion opened a new issue, #5636:
URL: https://github.com/apache/accumulo/issues/5636

   Spotbugs was upgraded to 4.9.3.0 in #5623 , but the SharedVariableAtomicityDetector was disabled. This detector was failing on non-volatile variables that were referenced from different methods and non-atomic changes to primitives. Changing all variables to be volatile or Atomic is likely not the correct change here as that might unnecessarily slow things down. For example, Spotbugs is complaining about non-volatile variables in classes that are not thread safe, but it doesn't know that. This was noted in spotbugs issue 3390 and a subsequent PR was merged to ignore classes marked with the annotation `javax.annotation.concurrent.NotThreadSafe`. I don't think there has been a release with this change in it yet though. Resolving this issue should likely wait until there is a Spotbugs release with this change so that the annotation can be applied to our classes that are not thread safe.


-- 
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: notifications-unsubscribe@accumulo.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Enable SharedVariableAtomicityDetector SpotBugs detector [accumulo]

Posted by "dlmarion (via GitHub)" <gi...@apache.org>.
dlmarion commented on issue #5636:
URL: https://github.com/apache/accumulo/issues/5636#issuecomment-5528428756

   Closed by #6025


-- 
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: notifications-unsubscribe@accumulo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Enable SharedVariableAtomicityDetector SpotBugs detector [accumulo]

Posted by "DomGarguilo (via GitHub)" <gi...@apache.org>.
DomGarguilo commented on issue #5636:
URL: https://github.com/apache/accumulo/issues/5636#issuecomment-3214645444

   > This was noted in spotbugs issue 3390 and a subsequent PR was merged to ignore classes marked with the annotation `javax.annotation.concurrent.NotThreadSafe`. I don't think there has been a release with this change in it yet though. Resolving this issue should likely wait until there is a Spotbugs release with this change so that the annotation can be applied to our classes that are not thread safe.
   
   A new release ([4.9.4.0](https://github.com/spotbugs/spotbugs-maven-plugin/releases/tag/spotbugs-maven-plugin-4.9.4.0)) has been made that includes the mentioned `NotThreadSafe` tag.


-- 
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: notifications-unsubscribe@accumulo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Enable SharedVariableAtomicityDetector SpotBugs detector [accumulo]

Posted by "dlmarion (via GitHub)" <gi...@apache.org>.
dlmarion commented on issue #5636:
URL: https://github.com/apache/accumulo/issues/5636#issuecomment-3638953616

   I guess if you find a bug, then we can include it in a patch release. You will need to SharedVariableAtomicityDetector and then evaluate each occurrence to determine if the variable should be marked `volatile` or the `javax.annotation.concurrent.NotThreadSafe` annotation should be applied. 


-- 
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: notifications-unsubscribe@accumulo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Enable SharedVariableAtomicityDetector SpotBugs detector [accumulo]

Posted by "kevinrr888 (via GitHub)" <gi...@apache.org>.
kevinrr888 commented on issue #5636:
URL: https://github.com/apache/accumulo/issues/5636#issuecomment-3638937155

   70c2c78334a29a7cb543775cee291e66475ff0d2 bumped spotbugs to `4.9.5.0`, so I'll look into fixing this. 
   
   @dlmarion is there a reason we wouldn't want this in 2.1?


-- 
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: notifications-unsubscribe@accumulo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Enable SharedVariableAtomicityDetector SpotBugs detector [accumulo]

Posted by "dlmarion (via GitHub)" <gi...@apache.org>.
dlmarion closed issue #5636: Enable SharedVariableAtomicityDetector SpotBugs detector
URL: https://github.com/apache/accumulo/issues/5636


-- 
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: notifications-unsubscribe@accumulo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org