You are viewing a plain text version of this content. The canonical link for it is here.
Posted to codereview@trafodion.apache.org by sbroeder <gi...@git.apache.org> on 2016/02/02 22:16:24 UTC
[GitHub] incubator-trafodion pull request: Fix for JIRA [TRAFODION-1713]
GitHub user sbroeder opened a pull request:
https://github.com/apache/incubator-trafodion/pull/304
Fix for JIRA [TRAFODION-1713]
IDs returned from IDTMSRV process should be periodically re-calibrated
so that they are a better approximation of a logical time
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/sbroeder/incubator-trafodion sean_traf
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/incubator-trafodion/pull/304.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 #304
----
commit bc46f3df818651a6dae180689bb298551399be0d
Author: Sean Broeder <sb...@edev03.esgyn.local>
Date: 2016-02-02T21:13:18Z
Fix for JIRA [TRAFODION-1713]
IDs returned from IDTMSRV process should be periodically re-calibrated
so that they are a better approximation of a logical time
----
---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] incubator-trafodion pull request: Fix for JIRA [TRAFODION-1713]
Posted by DaveBirdsall <gi...@git.apache.org>.
Github user DaveBirdsall commented on a diff in the pull request:
https://github.com/apache/incubator-trafodion/pull/304#discussion_r51749694
--- Diff: core/sqf/src/tm/idtmsrv.cpp ---
@@ -53,6 +56,37 @@ void do_reply(BMS_SRE *pp_sre, char *pp_reply, int pv_len, short pv_ec);
//
+// Reset the global time counter
+//
+void reset_time_counter() {
+
+ struct timespec lv_new_ts;
+
+ clock_gettime(CLOCK_REALTIME, &lv_new_ts);
+ unsigned long lv_new_tsl = ((unsigned long) lv_new_ts.tv_sec << 20) |
+ ((unsigned long) lv_new_ts.tv_nsec / 1000);
+
+ unsigned long lv_existing_tsl = __sync_add_and_fetch_8(gp_shm, 0);
+ __sync_add_and_fetch_8(gp_shm, lv_new_tsl - lv_existing_tsl);
--- End diff --
Can time go backwards here? And would that cause a problem?
---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] incubator-trafodion pull request: Fix for JIRA [TRAFODION-1713]
Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:
https://github.com/apache/incubator-trafodion/pull/304
---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---