mirror of https://github.com/apache/cassandra
Deprecate background repair and probablistic read_repair_chance table options
patch by Aleksey Yeschenko; reviewed by Blake Eggleston for CASSANDRA-13910
This commit is contained in:
parent
00e5a3d508
commit
eaf9bf18b2
|
|
@ -1,4 +1,6 @@
|
|||
3.0.17
|
||||
* Deprecate background repair and probablistic read_repair_chance table options
|
||||
(CASSANDRA-13910)
|
||||
* Fix unbounded validation compactions on repair / revert CASSANDRA-13797 (CASSANDRA-14332)
|
||||
* Avoid deadlock when running nodetool refresh before node is fully up (CASSANDRA-14310)
|
||||
* Handle all exceptions when opening sstables (CASSANDRA-14202)
|
||||
|
|
|
|||
6
NEWS.txt
6
NEWS.txt
|
|
@ -53,6 +53,12 @@ Upgrading
|
|||
- Changes to bloom_filter_fp_chance will no longer take effect on existing sstables when the node is restarted. Only
|
||||
compactions/upgradesstables regenerates bloom filters and Summaries sstable components. See CASSANDRA-11163
|
||||
|
||||
Deprecation
|
||||
-----------
|
||||
- Background read repair has been deprecated. dclocal_read_repair_chance and
|
||||
read_repair_chance table options have been deprecated, and will be removed entirely in 4.0.
|
||||
See CASSANDRA-13910 for details.
|
||||
|
||||
3.0.16
|
||||
=====
|
||||
|
||||
|
|
|
|||
|
|
@ -27,6 +27,7 @@ import org.apache.cassandra.exceptions.ConfigurationException;
|
|||
import org.apache.cassandra.exceptions.SyntaxException;
|
||||
import org.apache.cassandra.schema.*;
|
||||
import org.apache.cassandra.schema.TableParams.Option;
|
||||
import org.apache.cassandra.service.ClientWarn;
|
||||
|
||||
import static java.lang.String.format;
|
||||
|
||||
|
|
@ -36,6 +37,8 @@ public final class TableAttributes extends PropertyDefinitions
|
|||
private static final Set<String> validKeywords;
|
||||
private static final Set<String> obsoleteKeywords;
|
||||
|
||||
private static boolean loggedReadRepairChanceDeprecationWarnings;
|
||||
|
||||
static
|
||||
{
|
||||
ImmutableSet.Builder<String> validBuilder = ImmutableSet.builder();
|
||||
|
|
@ -105,7 +108,17 @@ public final class TableAttributes extends PropertyDefinitions
|
|||
}
|
||||
|
||||
if (hasOption(Option.DCLOCAL_READ_REPAIR_CHANCE))
|
||||
builder.dcLocalReadRepairChance(getDouble(Option.DCLOCAL_READ_REPAIR_CHANCE));
|
||||
{
|
||||
double chance = getDouble(Option.DCLOCAL_READ_REPAIR_CHANCE);
|
||||
|
||||
if (chance != 0.0)
|
||||
{
|
||||
ClientWarn.instance.warn("dclocal_read_repair_chance table option has been deprecated and will be removed in version 4.0");
|
||||
maybeLogReadRepairChanceDeprecationWarning();
|
||||
}
|
||||
|
||||
builder.dcLocalReadRepairChance(chance);
|
||||
}
|
||||
|
||||
if (hasOption(Option.DEFAULT_TIME_TO_LIVE))
|
||||
builder.defaultTimeToLive(getInt(Option.DEFAULT_TIME_TO_LIVE));
|
||||
|
|
@ -123,7 +136,17 @@ public final class TableAttributes extends PropertyDefinitions
|
|||
builder.minIndexInterval(getInt(Option.MIN_INDEX_INTERVAL));
|
||||
|
||||
if (hasOption(Option.READ_REPAIR_CHANCE))
|
||||
builder.readRepairChance(getDouble(Option.READ_REPAIR_CHANCE));
|
||||
{
|
||||
double chance = getDouble(Option.READ_REPAIR_CHANCE);
|
||||
|
||||
if (chance != 0.0)
|
||||
{
|
||||
ClientWarn.instance.warn("read_repair_chance table option has been deprecated and will be removed in version 4.0");
|
||||
maybeLogReadRepairChanceDeprecationWarning();
|
||||
}
|
||||
|
||||
builder.readRepairChance(chance);
|
||||
}
|
||||
|
||||
if (hasOption(Option.SPECULATIVE_RETRY))
|
||||
builder.speculativeRetry(SpeculativeRetryParam.fromString(getString(Option.SPECULATIVE_RETRY)));
|
||||
|
|
@ -134,6 +157,15 @@ public final class TableAttributes extends PropertyDefinitions
|
|||
return builder.build();
|
||||
}
|
||||
|
||||
private void maybeLogReadRepairChanceDeprecationWarning()
|
||||
{
|
||||
if (!loggedReadRepairChanceDeprecationWarnings)
|
||||
{
|
||||
logger.warn("dclocal_read_repair_chance and read_repair_chance table options have been deprecated and will be removed in version 4.0");
|
||||
loggedReadRepairChanceDeprecationWarnings = true;
|
||||
}
|
||||
}
|
||||
|
||||
private Double getDeprecatedCrcCheckChance(Map<String, String> compressionOpts)
|
||||
{
|
||||
String value = compressionOpts.get(Option.CRC_CHECK_CHANCE.toString().toLowerCase());
|
||||
|
|
|
|||
Loading…
Reference in New Issue