Skip to content

Commit

Permalink
Allow an instance_start_time that is not 0
Browse files Browse the repository at this point in the history
  • Loading branch information
retrodaredevil committed Jan 17, 2023
1 parent 03008c9 commit cea61fe
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,6 @@ public DatabaseInfo(
this.compactRunning = compactRunning;
requireNonNull(this.cluster = cluster);
requireNonNull(this.instanceStartTime = instanceStartTime);
if (!instanceStartTime.equals("0")) {
throw new IllegalArgumentException("The instance_start_time must be 0! It is: " + instanceStartTime);
}
}
@JsonValue
private String _jacksonValue() {
Expand Down Expand Up @@ -97,6 +94,10 @@ public Cluster getCluster() {
return cluster;
}

/**
* Usually "0", but sometimes may be non-zero depending on database version: https://github.com/apache/couchdb/pull/3901
* @return The database creation time in seconds since the epoch
*/
public String getInstanceStartTime() {
return instanceStartTime;
}
Expand Down

0 comments on commit cea61fe

Please sign in to comment.