You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@geode.apache.org by GitBox <gi...@apache.org> on 2020/06/25 20:13:16 UTC

[GitHub] [geode] bschuchardt opened a new pull request #5306: GEODE-8195: ConcurrentModificationException from LocatorMembershipLis…

bschuchardt opened a new pull request #5306:
URL: https://github.com/apache/geode/pull/5306


   …tenerImpl
   
   I've replaced the "for" loop using an implicit Iterator with one using an
   explicit Iterator so that its safe "remove()" method can be used.  The
   Iterator method is stated as being the only safe way to modify the
   collection while iterating over its contents.
   
   I've also modified a test to validate the fix.  The test forces a
   failure to send two messages to an address.  The failures are then
   handled in the code that was throwing the
   ConcurrentModificationException and, since there are two failures,
   it causes two removals to be performedon the failedMessages collection.
   
   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.
   


----------------------------------------------------------------
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.

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



[GitHub] [geode] Bill commented on a change in pull request #5306: GEODE-8195: ConcurrentModificationException from LocatorMembershipLis…

Posted by GitBox <gi...@apache.org>.
Bill commented on a change in pull request #5306:
URL: https://github.com/apache/geode/pull/5306#discussion_r445836429



##########
File path: geode-wan/src/main/java/org/apache/geode/cache/client/internal/locator/wan/LocatorMembershipListenerImpl.java
##########
@@ -328,6 +331,7 @@ public void run() {
                   Thread.currentThread().interrupt();
                   logger.warn(
                       "Locator Membership listener permanently failed to exchange locator information due to interruption.");
+                  return;

Review comment:
       If a sleep is interrupted we now bail out of `run()` entirely, rather than continuing on to attempt delivering the message to the next target. Why the change?




----------------------------------------------------------------
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.

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



[GitHub] [geode] bschuchardt commented on pull request #5306: GEODE-8195: ConcurrentModificationException from LocatorMembershipLis…

Posted by GitBox <gi...@apache.org>.
bschuchardt commented on pull request #5306:
URL: https://github.com/apache/geode/pull/5306#issuecomment-649853272


   DistributedTests failed due to GEODE-8172, which we're seeing in a lot of runs.


----------------------------------------------------------------
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.

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



[GitHub] [geode] bschuchardt commented on a change in pull request #5306: GEODE-8195: ConcurrentModificationException from LocatorMembershipLis…

Posted by GitBox <gi...@apache.org>.
bschuchardt commented on a change in pull request #5306:
URL: https://github.com/apache/geode/pull/5306#discussion_r445840597



##########
File path: geode-wan/src/main/java/org/apache/geode/cache/client/internal/locator/wan/LocatorMembershipListenerImpl.java
##########
@@ -328,6 +331,7 @@ public void run() {
                   Thread.currentThread().interrupt();
                   logger.warn(
                       "Locator Membership listener permanently failed to exchange locator information due to interruption.");
+                  return;

Review comment:
       The exception handler was leaving the interrupt bit set.  Nothing useful could happen after that.  Any I/O operations that it attempted would fail, resulting in the thread hanging around sleeping until it gave up;.




----------------------------------------------------------------
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.

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



[GitHub] [geode] bschuchardt merged pull request #5306: GEODE-8195: ConcurrentModificationException from LocatorMembershipLis…

Posted by GitBox <gi...@apache.org>.
bschuchardt merged pull request #5306:
URL: https://github.com/apache/geode/pull/5306


   


----------------------------------------------------------------
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.

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