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 2022/02/18 20:44:58 UTC

[GitHub] [geode] boglesby commented on a change in pull request #7382: GEODE-10063: Correctly set primary queue connection.

boglesby commented on a change in pull request #7382:
URL: https://github.com/apache/geode/pull/7382#discussion_r810328021



##########
File path: geode-core/src/main/java/org/apache/geode/cache/client/internal/QueueManagerImpl.java
##########
@@ -724,7 +724,7 @@ private void recoverRedundancy(Set<ServerLocation> excludedServers, boolean reco
     }
   }
 
-  private QueueConnectionImpl promoteBackupToPrimary(List<Connection> backups) {
+  QueueConnectionImpl promoteBackupToPrimary(List<Connection> backups) {

Review comment:
       Do you need to add VisibleForTesting to this method?

##########
File path: geode-core/src/main/java/org/apache/geode/cache/client/internal/QueueManagerImpl.java
##########
@@ -355,7 +355,7 @@ void connectionCrashed(Connection con) {
     endpointCrashed(con.getEndpoint());
   }
 
-  private void endpointCrashed(Endpoint endpoint) {
+  void endpointCrashed(Endpoint endpoint) {

Review comment:
       Do you need to add VisibleForTesting to this method?

##########
File path: geode-core/src/main/java/org/apache/geode/cache/client/internal/QueueManagerImpl.java
##########
@@ -844,12 +844,12 @@ private QueueConnectionImpl createNewPrimary(Set<ServerLocation> excludedServers
    * First we try to make a backup server the primary, but if run out of backup servers we will try
    * to find a new server.
    */
-  private void recoverPrimary(Set<ServerLocation> excludedServers) {
+  void recoverPrimary(Set<ServerLocation> excludedServers) {

Review comment:
       Do you need to add VisibleForTesting to this method?

##########
File path: geode-core/src/main/java/org/apache/geode/cache/client/internal/QueueManagerImpl.java
##########
@@ -980,7 +980,7 @@ private QueueConnectionImpl initializeQueueConnection(Connection connection, boo
   // connection but CCU may died as endpoint closed....
   // so before putting connection need to see if something(crash) happen we should be able to
   // recover from it
-  private boolean addToConnectionList(QueueConnectionImpl connection, boolean isPrimary) {
+  boolean addToConnectionList(QueueConnectionImpl connection, boolean isPrimary) {

Review comment:
       Do you need to add VisibleForTesting to this method?

##########
File path: geode-core/src/main/java/org/apache/geode/cache/client/internal/QueueManagerImpl.java
##########
@@ -373,8 +373,8 @@ private void endpointCrashed(Endpoint endpoint) {
                   ? (deadConnection.getUpdater().isPrimary() ? "Primary" : "Redundant")
                   : "Queue",
                   endpoint});
-      scheduleRedundancySatisfierIfNeeded(0);
       deadConnection.internalDestroy();
+      scheduleRedundancySatisfierIfNeeded(0);

Review comment:
       I'm glad you did this. I wanted to reverse these two method calls for GEODE-10009.




-- 
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@geode.apache.org

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