maedhroz commented on code in PR #1835:
URL: https://github.com/apache/cassandra/pull/1835#discussion_r966163789
##########
src/java/org/apache/cassandra/service/StorageService.java:
##########
@@ -4980,9 +4980,19 @@ private void unbootstrap(Runnable onFinish) throws
ExecutionException, Interrupt
logger.debug("waiting for batch log processing.");
batchlogReplay.get();
- setMode(Mode.LEAVING, "streaming hints to other nodes", true);
+ Future<?> hintsSuccess = ImmediateFuture.success(null);
- Future hintsSuccess = streamHints();
+ if (DatabaseDescriptor.getTransferHintsOnDecommission())
+ {
+ setMode(Mode.LEAVING, "streaming hints to other nodes", true);
+ hintsSuccess = streamHints();
+ }
+ else
+ {
+ DatabaseDescriptor.setHintedHandoffEnabled(false);
+ HintsService.instance.pauseDispatch();
+ HintsService.instance.deleteAllHints();
+ }
// wait for the transfer runnables to signal the latch.
logger.debug("waiting for stream acks.");
Review Comment:
We're still doing the main un-bootstrap, so I think it's fine where it is.
--
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]