yifan-c commented on code in PR #73:
URL:
https://github.com/apache/cassandra-analytics/pull/73#discussion_r1717298908
##########
cassandra-analytics-core/src/main/java/org/apache/cassandra/spark/bulkwriter/ImportCompletionCoordinator.java:
##########
@@ -219,28 +224,42 @@ private void addCompletionMonitor(CompletableFuture<?>
future)
// whenComplete callback will still be invoked when the future is
cancelled.
// In such case, expect CancellationException
future.whenComplete((v, t) -> {
- LOGGER.info("Completed slice requests {}/{}",
completedSlices.incrementAndGet(), importFutures.keySet().size());
-
if (t instanceof CancellationException)
{
RequestAndInstance rai = importFutures.get(future);
LOGGER.info("Cancelled import. instance={} slice={}",
rai.nodeFqdn, rai.requestPayload);
return;
}
+ LOGGER.info("Completed slice requests {}/{}",
completedSlices.incrementAndGet(), importFutures.keySet().size());
+
// only enter the block once
if (satisfiedSlices.get() == totalSlices
- && terminalScheduled.compareAndSet(false, true))
+ && consistencyLevelReached.compareAndSet(false, true))
{
- long timeToAllSatisfiedNanos = System.nanoTime() -
waitStartNanos;
- long timeout = estimateTimeout(timeToAllSatisfiedNanos);
+ long nowNanos = System.nanoTime();
+ long timeToAllSatisfiedNanos = nowNanos - waitStartNanos;
+ long elapsedNanos = nowNanos - startTimeNanos;
+ long timeoutNanos =
estimateTimeoutNanos(timeToAllSatisfiedNanos, elapsedNanos,
+
job.importCoordinatorTimeoutMultiplier(),
+ minSliceSize,
maxSliceSize,
+
job.jobTimeoutSeconds());
LOGGER.info("The specified consistency level of the job has
been satisfied. " +
Review Comment:
ok. I will break the message into 2 parts. The first is to confirm that CL
has reached. The second is to log the wait time.
--
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]