mirror of https://github.com/apache/cassandra
Merge branch 'cassandra-4.0' into cassandra-4.1
This commit is contained in:
commit
71cef76faa
|
|
@ -50,6 +50,7 @@ Merged from 3.11:
|
|||
* Document usage of closed token intervals in manual compaction (CASSANDRA-17575)
|
||||
* Creating of a keyspace on insufficient number of replicas should filter out gosspping-only members (CASSANDRA-17759)
|
||||
Merged from 3.0:
|
||||
* Improve libjemalloc resolution in bin/cassandra (CASSANDRA-15767)
|
||||
* Fix restarting of services on gossipping-only member (CASSANDRA-17752)
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -132,21 +132,27 @@ find_library()
|
|||
pattern=$1
|
||||
path=$(echo ${2} | tr ":" " ")
|
||||
|
||||
find $path -regex "$pattern" -print 2>/dev/null | head -n 1
|
||||
find $path -regex "$pattern" -print 2>/dev/null | sort -ru | head -n 1
|
||||
}
|
||||
case "`uname -s`" in
|
||||
Linux)
|
||||
if [ -z $CASSANDRA_LIBJEMALLOC ] ; then
|
||||
dirs="/lib64 /lib /usr/lib64 /usr/lib "
|
||||
which ldconfig > /dev/null 2>&1
|
||||
if [ $? = 0 ] ; then
|
||||
# e.g. for CentOS
|
||||
dirs="/lib64 /lib /usr/lib64 /usr/lib `ldconfig -v 2>/dev/null | grep -v '^\s' | sed 's/^\([^:]*\):.*$/\1/'`"
|
||||
else
|
||||
# e.g. for Debian, OpenSUSE
|
||||
dirs="/lib64 /lib /usr/lib64 /usr/lib `cat /etc/ld.so.conf /etc/ld.so.conf.d/*.conf | grep '^/'`"
|
||||
dirs="$dirs `ldconfig -v 2>/dev/null | grep -v '^\s' | sed 's/^\([^:]*\):.*$/\1/'`"
|
||||
fi
|
||||
if [ -f /etc/ld.so.conf ]; then
|
||||
dirs="$dirs `cat /etc/ld.so.conf | grep '^/'`"
|
||||
fi
|
||||
additional_configs=$(ls /etc/ld.so.conf.d/*.conf 2>&1)
|
||||
if [ $? = 0 ]; then
|
||||
for conf in $additional_configs; do
|
||||
dirs="$dirs `cat $conf | grep '^/'`"
|
||||
done
|
||||
fi
|
||||
dirs=`echo $dirs | tr " " ":"`
|
||||
CASSANDRA_LIBJEMALLOC=$(find_library '.*/libjemalloc\.so\(\.1\)*' $dirs)
|
||||
CASSANDRA_LIBJEMALLOC=$(find_library '.*/libjemalloc\.so.*' $dirs)
|
||||
fi
|
||||
if [ ! -z $CASSANDRA_LIBJEMALLOC ] ; then
|
||||
export JVM_OPTS="$JVM_OPTS -Dcassandra.libjemalloc=$CASSANDRA_LIBJEMALLOC"
|
||||
|
|
|
|||
Loading…
Reference in New Issue