Remove use of String.intern()

patch by Benjamin Lerer; reviewed by Brandon Williams for CASSANDRA-15810
This commit is contained in:
Benjamin Lerer 2020-12-17 11:24:46 +01:00
parent 5879813db7
commit 0d56f70ae7
3 changed files with 2 additions and 8 deletions

View File

@ -1,4 +1,5 @@
4.0-beta4
* Remove use of String.intern() (CASSANDRA-15810)
* Fix the missing bb position in ByteBufferAccessor.getUnsignedShort (CASSANDRA-16249)
* Make sure OOM errors are rethrown on truncation failure (CASSANDRA-16254)
* Send back client warnings when creating too many tables/keyspaces (CASSANDRA-16309)

View File

@ -103,9 +103,6 @@
# Per-thread stack size.
-Xss256k
# Larger interned string table, for gossip's benefit (CASSANDRA-6410)
-XX:StringTableSize=1000003
# Make sure all memory is faulted and zeroed on startup.
# This helps prevent soft faults in containers and makes
# transparent hugepage allocation more effective.

View File

@ -87,11 +87,7 @@ public class VersionedValue implements Comparable<VersionedValue>
private VersionedValue(String value, int version)
{
assert value != null;
// blindly interning everything is somewhat suboptimal -- lots of VersionedValues are unique --
// but harmless, and interning the non-unique ones saves significant memory. (Unfortunately,
// we don't really have enough information here in VersionedValue to tell the probably-unique
// values apart.) See CASSANDRA-6410.
this.value = value.intern();
this.value = value;
this.version = version;
}