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/07/08 21:29:01 UTC

[GitHub] [geode] jinmeiliao commented on a change in pull request #5350: GEODE-8200: Rebalance operations stuck in "IN_PROGRESS" state forever

jinmeiliao commented on a change in pull request #5350:
URL: https://github.com/apache/geode/pull/5350#discussion_r451826206



##########
File path: geode-core/src/main/java/org/apache/geode/management/internal/operation/OperationState.java
##########
@@ -28,12 +28,25 @@
  */
 public class OperationState<A extends ClusterManagementOperation<V>, V extends OperationResult>
     implements Identifiable<String> {
+  private static final long serialVersionUID = 8212319653561969588L;
   private final String opId;
   private final A operation;
   private final Date operationStart;
   private Date operationEnd;
   private V result;
   private Throwable throwable;
+  private String locator;
+
+  public String getLocator() {
+    return this.locator;
+  }
+
+  public void setLocator(
+      String locator) {
+    synchronized (this) {

Review comment:
       this is just one line operation, is this not atomic? If not, can we put the synchronize on the method?

##########
File path: geode-core/src/main/java/org/apache/geode/management/internal/operation/OperationStateStore.java
##########
@@ -53,6 +53,8 @@
    */
   <V extends OperationResult> void recordEnd(String opId, V result, Throwable exception);
 
+  void recordLocator(String opId, String locator);

Review comment:
       instead of adding this interface, you can change the method of recordStart() to add the a locator id parameter, since when started, we should always know what locator started this operation.




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