frankgh commented on code in PR #143:
URL: https://github.com/apache/cassandra-sidecar/pull/143#discussion_r1823580847
##########
server/src/main/java/org/apache/cassandra/sidecar/db/RestoreRange.java:
##########
@@ -463,11 +469,11 @@ public long estimatedSpaceRequiredInBytes()
public String shortDescription()
{
- return "StartToken: " + startToken + ", EndToken: " + endToken +
- ", SliceId: " + sliceId +
- ", Key: " + sliceKey() +
- ", Bucket: " + sliceBucket() +
- ", Checksum: " + sliceChecksum();
+ return "RestoreRange{" +
Review Comment:
should we preserve the checksum?
##########
server/src/test/java/org/apache/cassandra/sidecar/restore/RestoreJobDiscovererTest.java:
##########
@@ -290,6 +291,33 @@ void testCleanupJobIdsByDay()
.doesNotContainKey(job.createdAt.getDaysSinceEpoch());
}
+ @Test
+ void testAdjustRecencyDays()
+ {
+ when(sidecarSchema.isInitialized()).thenReturn(true);
+ assertThat(loop.jobDiscoveryRecencyDays()).isEqualTo(10);
+ loop.registerPeriodicTaskExecutor(executor);
+
+ executeBlocking();
+
+ assertThat(loop.jobDiscoveryRecencyDays())
+ .describedAs("Recency days is adjusted to 1 since there is no jobs
running")
Review Comment:
```suggestion
.describedAs("Recency days is adjusted to 1 since there are no jobs
running")
```
##########
server/src/main/java/org/apache/cassandra/sidecar/restore/RestoreProcessor.java:
##########
@@ -170,9 +169,6 @@ public void execute(Promise<Void> promise)
break;
}
- Preconditions.checkState(range.canProduceTask(),
Review Comment:
do we not need this check anymore?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]