mirror of https://github.com/apache/cassandra
Add get/setDataDiskUsageKeyspaceWideProtectionEnabled to GuardrailsConfig
This was forgotten in the original patch. patch by Stefan Miklosovic; reviewed by Paulo Motta for CASSANDRA-21024
This commit is contained in:
parent
1f078c0daf
commit
b3bc7c019f
|
|
@ -996,12 +996,13 @@ public class GuardrailsOptions implements GuardrailsConfig
|
|||
x -> config.data_disk_usage_percentage_fail_threshold = x);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean getDataDiskUsageKeyspaceWideProtectionEnabled()
|
||||
{
|
||||
return config.data_disk_usage_keyspace_wide_protection_enabled;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setDataDiskUsageKeyspaceWideProtectionEnabled(boolean enabled)
|
||||
{
|
||||
updatePropertyWithLogging("data_disk_usage_keyspace_wide_protection_enabled",
|
||||
|
|
|
|||
|
|
@ -436,6 +436,19 @@ public interface GuardrailsConfig
|
|||
*/
|
||||
int getDataDiskUsagePercentageFailThreshold();
|
||||
|
||||
/**
|
||||
* @return Whether a single node replicating a given keyspace being full should block writes for the entire
|
||||
* keyspace. Returns {@code true} if this behavior is enabled, {@code false} otherwise.
|
||||
*/
|
||||
boolean getDataDiskUsageKeyspaceWideProtectionEnabled();
|
||||
|
||||
/**
|
||||
* Enables or disables blocking writes for a keyspace when any node replicating that keyspace is full.
|
||||
*
|
||||
* @param enabled {@code true} to block writes keyspace-wide once a replica is full, {@code false} to disable.
|
||||
*/
|
||||
void setDataDiskUsageKeyspaceWideProtectionEnabled(boolean enabled);
|
||||
|
||||
/**
|
||||
* @return The max disk size of the data directories when calculating disk usage thresholds, {@code null} means
|
||||
* disabled.
|
||||
|
|
|
|||
Loading…
Reference in New Issue