[GitHub] incubator-hawq pull request #1223: HAWQ-1439. tolerate system time being cha...

2017-05-07 Thread jiny2
Github user jiny2 closed the pull request at:

https://github.com/apache/incubator-hawq/pull/1223


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-hawq pull request #1223: HAWQ-1439. tolerate system time being cha...

2017-04-26 Thread paul-guo-
Github user paul-guo- commented on a diff in the pull request:

https://github.com/apache/incubator-hawq/pull/1223#discussion_r113598189
  
--- Diff: src/backend/resourcemanager/utils/network_utils.c ---
@@ -41,9 +42,23 @@ static void cleanupSocketConnectionPool(int code, Datum 
arg);
 
 uint64_t gettime_microsec(void)
 {
-static struct timeval t;
-gettimeofday(,NULL);
-return 100ULL * t.tv_sec + t.tv_usec;
+   struct timeval newTime;
+   int status = 1;
+   uint64_t t = 0;
+
+#if HAVE_LIBRT
+   struct timespec ts;
+   status = clock_gettime(CLOCK_MONOTONIC, );
+   newTime.tv_sec = ts.tv_sec;
+   newTime.tv_usec = ts.tv_nsec / 1000;
+#endif
+
+   if (status != 0)
+   {
+   gettimeofday(, NULL);
+   }
+   t = ((uint64_t)newTime.tv_sec) * USECS_PER_SECOND + newTime.tv_usec;
+return t;
--- End diff --

spaces -> tab.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-hawq pull request #1223: HAWQ-1439. tolerate system time being cha...

2017-04-26 Thread paul-guo-
Github user paul-guo- commented on a diff in the pull request:

https://github.com/apache/incubator-hawq/pull/1223#discussion_r113598785
  
--- Diff: src/backend/resourcemanager/utils/network_utils.c ---
@@ -29,6 +29,7 @@
 #include 
 #include 
 #include 
+#include 
--- End diff --

You might add the following header file to suppress the warning about 
missing definition of on_proc_exit().

#include "storage/ipc.h"


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-hawq pull request #1223: HAWQ-1439. tolerate system time being cha...

2017-04-24 Thread jiny2
GitHub user jiny2 opened a pull request:

https://github.com/apache/incubator-hawq/pull/1223

HAWQ-1439. tolerate system time being changed to earlier point when 
checking resource context timeout



You can merge this pull request into a Git repository by running:

$ git pull https://github.com/jiny2/incubator-hawq HAWQ-1439

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/incubator-hawq/pull/1223.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #1223


commit d1d9ae7fb44974d0c29c1a665f6affe0aa08fabb
Author: Yi 
Date:   2017-04-24T09:40:30Z

HAWQ-1439. tolerate system time being changed to earlier point when 
checking resource context timeout




---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---