[ 
https://issues.apache.org/jira/browse/SCB-211?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16325547#comment-16325547
 ] 

ASF GitHub Bot commented on SCB-211:
------------------------------------

WillemJiang commented on a change in pull request #113: SCB-211 wait until 
connection recover instead of try sending
URL: 
https://github.com/apache/incubator-servicecomb-saga/pull/113#discussion_r161396088
 
 

 ##########
 File path: 
omega/omega-connector/omega-connector-grpc/src/main/java/org/apache/servicecomb/saga/omega/connector/grpc/PushBackReconnectRunnable.java
 ##########
 @@ -31,26 +33,39 @@
   private final Map<MessageSender, Long> senders;
   private final BlockingQueue<Runnable> pendingTasks;
 
+  private final ReentrantLock lock;
+
+  private final Condition condition;
+
   PushBackReconnectRunnable(
       MessageSender messageSender,
       Map<MessageSender, Long> senders,
-      BlockingQueue<Runnable> pendingTasks) {
+      BlockingQueue<Runnable> pendingTasks,
+      ReentrantLock lock,
+      Condition condition) {
     this.messageSender = messageSender;
     this.senders = senders;
     this.pendingTasks = pendingTasks;
+    this.lock = lock;
+    this.condition = condition;
   }
 
   @Override
   public void run() {
+    lock.lock();
 
 Review comment:
   why do we need the lock here?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


> [pack] exponential backoff reconnect on cluster down or network down
> --------------------------------------------------------------------
>
>                 Key: SCB-211
>                 URL: https://issues.apache.org/jira/browse/SCB-211
>             Project: Apache ServiceComb
>          Issue Type: Improvement
>          Components: Saga
>            Reporter: Yin Xiang
>            Assignee: Eric Lee
>
> when omega is disconnected from alpha cluster, it keeps trying on failure of 
> sending event.
> an exponential back off retry is better for the sake of cpu resources and 
> disk space due to logs



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to