You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafodion.apache.org by li...@apache.org on 2018/05/04 15:47:20 UTC
[2/4] trafodion git commit: [TRAFODION-3041] Addressed review comment
[TRAFODION-3041] Addressed review comment
Project: http://git-wip-us.apache.org/repos/asf/trafodion/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafodion/commit/bffd05be
Tree: http://git-wip-us.apache.org/repos/asf/trafodion/tree/bffd05be
Diff: http://git-wip-us.apache.org/repos/asf/trafodion/diff/bffd05be
Branch: refs/heads/master
Commit: bffd05bec555faea9779b1ba0d376030d9301f15
Parents: c9570e3
Author: Haolin.song <40...@qq.com>
Authored: Wed Apr 25 17:59:32 2018 +0000
Committer: Haolin.song <40...@qq.com>
Committed: Wed Apr 25 17:59:32 2018 +0000
----------------------------------------------------------------------
core/conn/odbc/src/odbc/nsksrvr/SrvrConnect.cpp | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/trafodion/blob/bffd05be/core/conn/odbc/src/odbc/nsksrvr/SrvrConnect.cpp
----------------------------------------------------------------------
diff --git a/core/conn/odbc/src/odbc/nsksrvr/SrvrConnect.cpp b/core/conn/odbc/src/odbc/nsksrvr/SrvrConnect.cpp
index d5879e0..c35659c 100644
--- a/core/conn/odbc/src/odbc/nsksrvr/SrvrConnect.cpp
+++ b/core/conn/odbc/src/odbc/nsksrvr/SrvrConnect.cpp
@@ -559,14 +559,16 @@ static void* SessionWatchDog(void* arg)
int time_limit = aggrInterval;
//0:None 1:update 2:insert/upsert cache limit 3:achieve timeline
int execute_flag = REPOS_EXECUTE_NONE;
- clock_t time_start = clock();
- clock_t time_end= clock();
+ int sleep_count = 0;
REPOS_STATS repos_stats;
while(!record_session_done && okToGo)
{
- time_start = clock();
- while(repos_queue.isEmpty() && (((time_end = clock()) - time_start) / 1000000 < time_limit));
+ sleep_count = 0;
+ while(repos_queue.isEmpty() && (sleep_count < time_limit)){
+ sleep(1);
+ sleep_count++;
+ }
if(!repos_queue.isEmpty()){
repos_stats = repos_queue.get_task();