yifan-c commented on code in PR #96:
URL: https://github.com/apache/cassandra-sidecar/pull/96#discussion_r1470417348
##########
src/main/java/org/apache/cassandra/sidecar/db/RestoreJob.java:
##########
@@ -156,13 +123,28 @@ private RestoreJob(Builder builder)
this.expireAt = builder.expireAt;
this.bucketCount = builder.bucketCount;
this.consistencyLevel = builder.consistencyLevel;
+ this.isMaterialized = builder.isMaterialized;
}
public Builder unbuild()
{
return new Builder(this);
}
+ /**
+ * When a job object is materialized from database, and it has non-null
consistencyLevel, the range of the slices
+ * of the restore is managed by Sidecar server, meaning that server should
assign slices to sidecar instances and
+ * check whether the job has met the consistency level to complete the
job; otherwise, sidecar instances are just
+ * simple workers and rely on client for decision-making.
+ * Depending on the return value, call-sites select the correct handling
for the restore jobs and slices
+ * @return true when sidecar server manages the slices based on the token
range; otherwise, return false.
+ */
+ public boolean isRangeManagedByServer()
Review Comment:
naming is hard. Open to suggestions
--
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]