You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@geode.apache.org by "balesh2 (GitHub)" <gi...@apache.org> on 2019/04/01 19:21:21 UTC

[GitHub] [geode] balesh2 opened pull request #3387: GEODE-6584: remove unecessary synchronization

Remove synchronization around changing values that could be volatile and
that are atomic. Results in a performance gain.

Thank you for submitting a contribution to Apache Geode.

In order to streamline the review of the contribution we ask you
to ensure the following steps have been taken:

### For all changes:
- [ ] Is there a JIRA ticket associated with this PR? Is it referenced in the commit message?

- [ ] Has your PR been rebased against the latest commit within the target branch (typically `develop`)?

- [ ] Is your initial contribution a single, squashed commit?

- [ ] Does `gradlew build` run cleanly?

- [ ] Have you written or updated unit tests to verify your changes?

- [ ] If adding new dependencies to the code, are these dependencies licensed in a way that is compatible for inclusion under [ASF 2.0](http://www.apache.org/legal/resolved.html#category-a)?

### Note:
Please ensure that once the PR is submitted, check Concourse for build issues and
submit an update to your PR as soon as possible. If you need help, please send an
email to dev@geode.apache.org.


[ Full content available at: https://github.com/apache/geode/pull/3387 ]
This message was relayed via gitbox.apache.org for notifications@geode.apache.org

[GitHub] [geode] balesh2 commented on pull request #3387: GEODE-6584: remove unecessary synchronization

Posted by "balesh2 (GitHub)" <gi...@apache.org>.
Thank you, I meant to have a ! in that if statement

[ Full content available at: https://github.com/apache/geode/pull/3387 ]
This message was relayed via gitbox.apache.org for notifications@geode.apache.org

[GitHub] [geode] dschneider-pivotal commented on pull request #3387: GEODE-6584: remove unecessary synchronization

Posted by "dschneider-pivotal (GitHub)" <gi...@apache.org>.
why not move this method to the ServerConnectionCollection class since it only works with it?

[ Full content available at: https://github.com/apache/geode/pull/3387 ]
This message was relayed via gitbox.apache.org for notifications@geode.apache.org

[GitHub] [geode] dschneider-pivotal commented on pull request #3387: GEODE-6584: remove unecessary synchronization

Posted by "dschneider-pivotal (GitHub)" <gi...@apache.org>.
The old logic was if terminating then don't increment.
But this new method only increments if terminating.
Also I think you want to return false if terminating and true if you increment.

[ Full content available at: https://github.com/apache/geode/pull/3387 ]
This message was relayed via gitbox.apache.org for notifications@geode.apache.org

[GitHub] [geode] dschneider-pivotal commented on pull request #3387: GEODE-6584: remove unecessary synchronization

Posted by "dschneider-pivotal (GitHub)" <gi...@apache.org>.
It seems like this should be one method on ServerConnectionCollection that can both test isTerminating and increment the processing count. You could call it incrementProcessing() and if it returns false set this.processMessages to false and return. I'd like to see the ServerConnectionCollection instance variable made private instead of other classes (like this one) access them.

[ Full content available at: https://github.com/apache/geode/pull/3387 ]
This message was relayed via gitbox.apache.org for notifications@geode.apache.org

[GitHub] [geode] balesh2 closed pull request #3387: GEODE-6584: remove unecessary synchronization

Posted by "balesh2 (GitHub)" <gi...@apache.org>.
[ pull request closed by balesh2 ]

[ Full content available at: https://github.com/apache/geode/pull/3387 ]
This message was relayed via gitbox.apache.org for notifications@geode.apache.org

[GitHub] [geode] dschneider-pivotal commented on pull request #3387: GEODE-6584: remove unecessary synchronization

Posted by "dschneider-pivotal (GitHub)" <gi...@apache.org>.
make this private and add gettor/settor as needed

[ Full content available at: https://github.com/apache/geode/pull/3387 ]
This message was relayed via gitbox.apache.org for notifications@geode.apache.org

[GitHub] [geode] balesh2 commented on issue #3387: GEODE-6584: remove unecessary synchronization

Posted by "balesh2 (GitHub)" <gi...@apache.org>.
CI Failure in UpgradeTestOpenJDK11 is due to this known hang: https://issues.apache.org/jira/browse/GEODE-6407

[ Full content available at: https://github.com/apache/geode/pull/3387 ]
This message was relayed via gitbox.apache.org for notifications@geode.apache.org