Github user ebortnik commented on a diff in the pull request:
https://github.com/apache/incubator-omid/pull/12#discussion_r129018747
--- Diff:
tso-server/src/main/java/org/apache/omid/tso/TimestampOracleImpl.java ---
@@ -134,9 +137,12 @@ public void initialize() throws IOException {
@SuppressWarnings("StatementWithEmptyBody")
@Override
public long next() {
- lastTimestamp++;
+ lastTimestamp += AbstractTransactionManager.NUM_OF_CHECKPOINTS;
- if (lastTimestamp == nextAllocationThreshold) {
+ if (lastTimestamp >= nextAllocationThreshold) {
+ // set the nextAllocationThread to max value of long in order
to
+ // make sure only one call to this function will execute a
thread to extend the timestamp batch.
+ nextAllocationThreshold = Long.MAX_VALUE;
--- End diff --
Please explain this line
---
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 [email protected] or file a JIRA ticket
with INFRA.
---