trafodion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lium...@apache.org
Subject [4/5] trafodion git commit: update the delay time using random number
Date Wed, 05 Sep 2018 10:20:48 GMT
update the delay time using random number


Project: http://git-wip-us.apache.org/repos/asf/trafodion/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafodion/commit/a0357a0e
Tree: http://git-wip-us.apache.org/repos/asf/trafodion/tree/a0357a0e
Diff: http://git-wip-us.apache.org/repos/asf/trafodion/diff/a0357a0e

Branch: refs/heads/master
Commit: a0357a0eecaf6e9f8a8459a3887e7a882e4a254e
Parents: 7700069
Author: Liu Ming <ovis_poly@sina.com>
Authored: Mon Sep 3 02:01:52 2018 +0000
Committer: Liu Ming <ovis_poly@sina.com>
Committed: Mon Sep 3 02:01:52 2018 +0000

----------------------------------------------------------------------
 core/sql/cli/Cli.cpp | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafodion/blob/a0357a0e/core/sql/cli/Cli.cpp
----------------------------------------------------------------------
diff --git a/core/sql/cli/Cli.cpp b/core/sql/cli/Cli.cpp
index 2bf04a3..3d5f033 100644
--- a/core/sql/cli/Cli.cpp
+++ b/core/sql/cli/Cli.cpp
@@ -10598,11 +10598,11 @@ static Lng32 SeqGenCliInterfaceUpdAndValidateMulti(
         }
       
       numTries++;
-      
-      if( 100 + numTries*25 < 1000)   //MAX is 1 second
-          DELAY(100 + numTries*25);
+      Lng32 delayTime = 100 + numTries*25 + rand()%10; 
+      if( delayTime < 1000)   //MAX is 1 second
+          DELAY(delayTime);
       else
-          DELAY(1000);
+          DELAY( 900 + rand() % 100);
     }
 
     // could not update it after 10 tries. Return error.


Mime
View raw message