dcapwell commented on code in PR #2256:
URL: https://github.com/apache/cassandra/pull/2256#discussion_r1178262391


##########
src/java/org/apache/cassandra/journal/Flusher.java:
##########
@@ -259,7 +259,7 @@ private void asyncFlushBatch(ActiveSegment<K>.Allocation 
alloc, Executor executo
             alloc.awaitFlush(journal.metrics.waitingOnFlush);
             pending.decrementAndGet();
             written.incrementAndGet();
-            executor.execute(onDurable);
+            executor.execute(callback);

Review Comment:
   the issue I face is that we then have 3 methods, if the user defines `run` 
then `onSuccess` will never trigger; which is confusing.
   
   A compromise is something like the following
   
   ```
   interface Callback extends Runnable {
     void onFailure(Throwable t);
   }
   ```
   
   This makes it so that there are only 2 methods: success and failure



-- 
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]

Reply via email to