mirror of https://github.com/apache/cassandra
Avoid CompactionOptions parsing for every read by WithoutPurgeableTombstones
patch by Dmitry Konstantinov; reviewed by Francisco Guerrero for CASSANDRA-21294
This commit is contained in:
parent
456590d555
commit
ae418d2a1c
|
|
@ -1,4 +1,5 @@
|
|||
6.0-alpha2
|
||||
* Avoid CompactionOptions parsing for every read by WithoutPurgeableTombstones (CASSANDRA-21294)
|
||||
* Ensure schema created before 2.1 without tableId in folder name can be loaded in SnapshotLoader (CASSANDRA-21246)
|
||||
* Differentiate between legitimate cases where the first entry is the same as the last entry and empty bounds in SSTableCursorWriter#addIndexBlock() (CASSANDRA-21255)
|
||||
* Introduce minimum_threshold for data resurrection startup check (CASSANDRA-21293)
|
||||
|
|
|
|||
|
|
@ -1403,7 +1403,7 @@ public class CompactionStrategyManager implements INotificationConsumer
|
|||
|
||||
public boolean onlyPurgeRepairedTombstones()
|
||||
{
|
||||
return Boolean.parseBoolean(params.options().get(AbstractCompactionStrategy.ONLY_PURGE_REPAIRED_TOMBSTONES));
|
||||
return params.onlyPurgeRepairedTombstones();
|
||||
}
|
||||
|
||||
public SSTableMultiWriter createSSTableMultiWriter(Descriptor descriptor,
|
||||
|
|
|
|||
|
|
@ -112,6 +112,7 @@ public final class CompactionParams
|
|||
private final ImmutableMap<String, String> options;
|
||||
private final boolean isEnabled;
|
||||
private final TombstoneOption tombstoneOption;
|
||||
private final boolean onlyPurgeRepairedTombstones;
|
||||
|
||||
private CompactionParams(Class<? extends AbstractCompactionStrategy> klass, Map<String, String> options, boolean isEnabled, TombstoneOption tombstoneOption)
|
||||
{
|
||||
|
|
@ -119,6 +120,7 @@ public final class CompactionParams
|
|||
this.options = ImmutableMap.copyOf(options);
|
||||
this.isEnabled = isEnabled;
|
||||
this.tombstoneOption = tombstoneOption;
|
||||
this.onlyPurgeRepairedTombstones = Boolean.parseBoolean(options.get(AbstractCompactionStrategy.ONLY_PURGE_REPAIRED_TOMBSTONES));
|
||||
}
|
||||
|
||||
public static CompactionParams create(Class<? extends AbstractCompactionStrategy> klass, Map<String, String> options)
|
||||
|
|
@ -279,6 +281,11 @@ public final class CompactionParams
|
|||
return options;
|
||||
}
|
||||
|
||||
public boolean onlyPurgeRepairedTombstones()
|
||||
{
|
||||
return onlyPurgeRepairedTombstones;
|
||||
}
|
||||
|
||||
public boolean isEnabled()
|
||||
{
|
||||
return isEnabled;
|
||||
|
|
|
|||
Loading…
Reference in New Issue