isaacreath commented on code in PR #4547:
URL: https://github.com/apache/cassandra/pull/4547#discussion_r2683875106
##########
src/java/org/apache/cassandra/service/disk/usage/DiskUsageBroadcaster.java:
##########
@@ -164,10 +244,41 @@ public void onRestart(InetAddressAndPort endpoint,
EndpointState state)
@Override
public void onRemove(InetAddressAndPort endpoint)
{
+ DiskUsageState usageState = usageInfo.getOrDefault(endpoint,
DiskUsageState.NOT_AVAILABLE);
+ updateDiskUsageStateForDatacenterOnRemoval(endpoint, usageState);
usageInfo.remove(endpoint);
hasStuffedOrFullNode =
usageInfo.values().stream().anyMatch(DiskUsageState::isStuffedOrFull);
}
+ private void updateDiskUsageStateForDatacenterOnRemoval(InetAddressAndPort
endpoint, DiskUsageState usageState)
+ {
+ if (!Guardrails.getDiskUsageStopWritesForKeyspaceOnFail())
Review Comment:
Yes good point. Will add a test case.
--
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]