Skip to content

Commit

Permalink
CNDB-12290 CC5 fix to use TrieMemtable as default in MemtableParams
Browse files Browse the repository at this point in the history
  • Loading branch information
djatnieks committed Dec 31, 2024
1 parent c27bf0a commit 816298e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@

import java.util.concurrent.atomic.AtomicReference;

import com.google.common.collect.ImmutableMap;

import org.apache.cassandra.config.InheritingClass;
import org.apache.cassandra.db.commitlog.CommitLogPosition;
import org.apache.cassandra.db.partitions.PartitionUpdate;
import org.apache.cassandra.db.partitions.TriePartitionUpdate;
Expand Down Expand Up @@ -73,4 +76,6 @@ public PartitionUpdate.Factory partitionUpdateFactory()
{
return TriePartitionUpdate.FACTORY;
}

public static InheritingClass CONFIGURATION = new InheritingClass(null, TrieMemtable.class.getName(), ImmutableMap.of());
}
6 changes: 3 additions & 3 deletions src/java/org/apache/cassandra/schema/MemtableParams.java
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@
import org.apache.cassandra.config.DatabaseDescriptor;
import org.apache.cassandra.config.InheritingClass;
import org.apache.cassandra.config.ParameterizedClass;
import org.apache.cassandra.db.memtable.DefaultMemtableFactory;
import org.apache.cassandra.db.memtable.Memtable;
import org.apache.cassandra.db.memtable.SkipListMemtableFactory;
import org.apache.cassandra.exceptions.ConfigurationException;

/**
Expand Down Expand Up @@ -95,8 +95,8 @@ public int hashCode()
}

private static final String DEFAULT_CONFIGURATION_KEY = "default";
private static final Memtable.Factory DEFAULT_MEMTABLE_FACTORY = SkipListMemtableFactory.INSTANCE;
private static final ParameterizedClass DEFAULT_CONFIGURATION = SkipListMemtableFactory.CONFIGURATION;
private static final Memtable.Factory DEFAULT_MEMTABLE_FACTORY = new DefaultMemtableFactory();
private static final ParameterizedClass DEFAULT_CONFIGURATION = DefaultMemtableFactory.CONFIGURATION;
private static final Map<String, ParameterizedClass>
CONFIGURATION_DEFINITIONS = expandDefinitions(DatabaseDescriptor.getMemtableConfigurations());
private static final Map<String, MemtableParams> CONFIGURATIONS = new HashMap<>();
Expand Down

0 comments on commit 816298e

Please sign in to comment.