Skip to content

Commit a656b7b

Browse files
committed
Merge branch 'cassandra-6.0' into trunk
2 parents e686ab8 + b3bc7c0 commit a656b7b

2 files changed

Lines changed: 15 additions & 1 deletion

File tree

src/java/org/apache/cassandra/config/GuardrailsOptions.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -996,12 +996,13 @@ public void setDataDiskUsagePercentageThreshold(int warn, int fail)
996996
x -> config.data_disk_usage_percentage_fail_threshold = x);
997997
}
998998

999-
999+
@Override
10001000
public boolean getDataDiskUsageKeyspaceWideProtectionEnabled()
10011001
{
10021002
return config.data_disk_usage_keyspace_wide_protection_enabled;
10031003
}
10041004

1005+
@Override
10051006
public void setDataDiskUsageKeyspaceWideProtectionEnabled(boolean enabled)
10061007
{
10071008
updatePropertyWithLogging("data_disk_usage_keyspace_wide_protection_enabled",

src/java/org/apache/cassandra/db/guardrails/GuardrailsConfig.java

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -436,6 +436,19 @@ public interface GuardrailsConfig
436436
*/
437437
int getDataDiskUsagePercentageFailThreshold();
438438

439+
/**
440+
* @return Whether a single node replicating a given keyspace being full should block writes for the entire
441+
* keyspace. Returns {@code true} if this behavior is enabled, {@code false} otherwise.
442+
*/
443+
boolean getDataDiskUsageKeyspaceWideProtectionEnabled();
444+
445+
/**
446+
* Enables or disables blocking writes for a keyspace when any node replicating that keyspace is full.
447+
*
448+
* @param enabled {@code true} to block writes keyspace-wide once a replica is full, {@code false} to disable.
449+
*/
450+
void setDataDiskUsageKeyspaceWideProtectionEnabled(boolean enabled);
451+
439452
/**
440453
* @return The max disk size of the data directories when calculating disk usage thresholds, {@code null} means
441454
* disabled.

0 commit comments

Comments
 (0)