Skip to content

Commit

Permalink
Assign a reasonable default to previous checkpoint (#33)
Browse files Browse the repository at this point in the history
Instant.MIN can cause overflow errors.
Fixes #32
  • Loading branch information
ashvina authored Jul 18, 2018
1 parent f6e9daf commit 598a327
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

<groupId>com.microsoft.dhalion</groupId>
<artifactId>dhalion</artifactId>
<version>0.2.2</version>
<version>0.2.3</version>
<packaging>jar</packaging>

<name>Dhalion</name>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,6 @@ public void destroy() {
this.executor.shutdownNow();
}


public static class ExecutionContext {
private final MeasurementsTable.Builder measurementsTableBuilder;
private final SymptomsTable.Builder symptomsTableBuilder;
Expand All @@ -139,7 +138,7 @@ private ExecutionContext(IHealthPolicy policy) {
}

private void captureCheckpoint() {
previousCheckpoint = checkpoint != null ? checkpoint : Instant.MIN;
previousCheckpoint = checkpoint != null ? checkpoint : Instant.EPOCH;
checkpoint = policy.getNextCheckpoint();
}

Expand Down

0 comments on commit 598a327

Please sign in to comment.