nosqlbuilder_pel7ppc64lebuilder0
5 years ago
17 changed files with 10741 additions and 0 deletions
@ -0,0 +1,59 @@ |
|||||||
|
diff --git a/src/mongo/bson/bsonobjbuilder.h b/src/mongo/bson/bsonobjbuilder.h |
||||||
|
index 6162495c1c..8c0bece154 100644 |
||||||
|
--- a/src/mongo/bson/bsonobjbuilder.h |
||||||
|
+++ b/src/mongo/bson/bsonobjbuilder.h |
||||||
|
@@ -350,7 +350,7 @@ public: |
||||||
|
return append(fieldName, d); |
||||||
|
} |
||||||
|
|
||||||
|
- BSONObjBuilder& appendNumber(StringData fieldName, size_t n) { |
||||||
|
+ BSONObjBuilder& appendNumber(StringData fieldName, uint64_t n) { |
||||||
|
static const size_t maxInt = (1 << 30); |
||||||
|
if (n < maxInt) |
||||||
|
append(fieldName, static_cast<int>(n)); |
||||||
|
@@ -359,6 +359,18 @@ public: |
||||||
|
return *this; |
||||||
|
} |
||||||
|
|
||||||
|
+ /** |
||||||
|
+ * Implement appendNumber for uint64_t and size_t on 32-bit platforms where |
||||||
|
+ * these types differs. Typically for |
||||||
|
+ * 32b: size_t ~ unsigned int; uint64_t ~ unsigned long long; |
||||||
|
+ * 64b: size_t ~ unsigned long; uint64_t ~ unsigned long; |
||||||
|
+ */ |
||||||
|
+ inline BSONObjBuilder& appendNumber( |
||||||
|
+ StringData fieldName, |
||||||
|
+ std::conditional<!std::is_same<uint64_t, size_t>::value, size_t, unsigned int>::type n) { |
||||||
|
+ return appendNumber(fieldName, static_cast<uint64_t>(n)); |
||||||
|
+ } |
||||||
|
+ |
||||||
|
BSONObjBuilder& appendNumber(StringData fieldName, Decimal128 decNumber) { |
||||||
|
return append(fieldName, decNumber); |
||||||
|
} |
||||||
|
diff --git a/src/mongo/db/storage/storage_options.cpp b/src/mongo/db/storage/storage_options.cpp |
||||||
|
index dfbb776656..02d9f18520 100644 |
||||||
|
--- a/src/mongo/db/storage/storage_options.cpp |
||||||
|
+++ b/src/mongo/db/storage/storage_options.cpp |
||||||
|
@@ -41,7 +41,7 @@ StorageGlobalParams::StorageGlobalParams() { |
||||||
|
} |
||||||
|
|
||||||
|
void StorageGlobalParams::reset() { |
||||||
|
- engine = "wiredTiger"; |
||||||
|
+ engine = "mmapv1"; |
||||||
|
engineSetByUser = false; |
||||||
|
dbpath = kDefaultDbPath; |
||||||
|
upgrade = false; |
||||||
|
diff --git a/src/mongo/platform/overflow_arithmetic.h b/src/mongo/platform/overflow_arithmetic.h |
||||||
|
index a213bf479f..0fcce4b138 100644 |
||||||
|
--- a/src/mongo/platform/overflow_arithmetic.h |
||||||
|
+++ b/src/mongo/platform/overflow_arithmetic.h |
||||||
|
@@ -143,7 +143,8 @@ inline bool mongoSignedAddOverflow64(long long lhs, long long rhs, long long* su |
||||||
|
return __builtin_add_overflow(lhs, rhs, sum); |
||||||
|
} |
||||||
|
|
||||||
|
-inline bool mongoUnsignedAddOverflow64(unsigned long lhs, unsigned long rhs, unsigned long* sum) { |
||||||
|
+// 32b arch: invalid conversion from 'size_t*' {aka 'unsigned int*'} to 'long unsigned int*' |
||||||
|
+inline bool mongoUnsignedAddOverflow64(std::size_t lhs, std::size_t rhs, std::size_t* sum) { |
||||||
|
return __builtin_add_overflow(lhs, rhs, sum); |
||||||
|
} |
||||||
|
|
@ -0,0 +1,57 @@ |
|||||||
|
This directory contains a test suite for the mongoDB daemon. To run the |
||||||
|
core JavaScripts tests, execute "./resmoke.py --suites core" in this |
||||||
|
directory. |
||||||
|
|
||||||
|
For use in Red Hat distributions, you should run the script as user |
||||||
|
mongodb, who is created with nologin shell however, so the best bet is |
||||||
|
something like: |
||||||
|
$ su - |
||||||
|
# cd /usr/share/mongodb-test |
||||||
|
# su -s /bin/bash mongodb -c "./resmoke.py --suites core" |
||||||
|
|
||||||
|
This will use the installed mongodb executables, but will run a private |
||||||
|
copy of the server process (using data files within |
||||||
|
/usr/share/mongodb-test/var/), so you need not start the mongod service |
||||||
|
beforehand. |
||||||
|
|
||||||
|
To clean up afterwards, remove the created "var/*" subdirectories, eg |
||||||
|
# su -s /bin/bash - mongodb -c "rm -rf /usr/share/mongodb-test/var/*" |
||||||
|
|
||||||
|
If one or more tests fail on your system, please read the following |
||||||
|
manual section for instructions on how to report the problem: |
||||||
|
|
||||||
|
http://www.mongodb.org/about/contributors/tutorial/submit-bug-reports/ |
||||||
|
|
||||||
|
MongoDB offers several test suites. To get list of provided test suites |
||||||
|
run "./resmoke.py -l". |
||||||
|
|
||||||
|
If you want to run a specific test, simply add path to JavaSctipt file |
||||||
|
from /usr/share/mongodb-test/jstests/ you want to run to the option to |
||||||
|
resmoke.py. It is also possible to specify more files. For example to |
||||||
|
run jstests/disk/*.js files execute "./resmoke.py jstests/disk/*.js" |
||||||
|
|
||||||
|
If you want to use some specific storage engine for mongod server you |
||||||
|
have to specify --storageEngine option. Actualy there are two stable |
||||||
|
storage engines: mmapv1 and wiredTiger (x86_64 only). |
||||||
|
|
||||||
|
For more options run "./resmoke.py --help". |
||||||
|
|
||||||
|
|
||||||
|
In Red Hat distributions use this syntax: |
||||||
|
$ su - |
||||||
|
# cd /usr/share/mongodb-test |
||||||
|
# su -s /bin/bash mongodb -c "./resmoke.py OPTIONS" |
||||||
|
|
||||||
|
More info about mongoDB testing: |
||||||
|
http://www.mongodb.org/about/contributors/tutorial/test-the-mongodb-server/ |
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Notes: |
||||||
|
|
||||||
|
- ARM architecture is not fully supported - |
||||||
|
https://jira.mongodb.org/browse/SERVER-1811 |
||||||
|
|
||||||
|
- This subpackage does not contain dbtest binary (it is going to be |
||||||
|
deprecated). |
||||||
|
|
@ -0,0 +1,13 @@ |
|||||||
|
diff --git a/SConstruct b/SConstruct |
||||||
|
index b76f4876eb..a07ff2e2da 100644 |
||||||
|
--- a/SConstruct |
||||||
|
+++ b/SConstruct |
||||||
|
@@ -3312,7 +3312,7 @@ def doConfigure(myenv): |
||||||
|
|
||||||
|
outputIndex = next((idx for idx in [0,1] if conf.CheckAltivecVbpermqOutput(idx)), None) |
||||||
|
if outputIndex is not None: |
||||||
|
- conf.env.SetConfigHeaderDefine("MONGO_CONFIG_ALTIVEC_VEC_VBPERMQ_OUTPUT_INDEX", outputIndex) |
||||||
|
+ conf.env.SetConfigHeaderDefine("MONGO_CONFIG_ALTIVEC_VEC_VBPERMQ_OUTPUT_INDEX", outputIndex) |
||||||
|
else: |
||||||
|
myenv.ConfError("Running on ppc64le, but can't find a correct vec_vbpermq output index. Compiler or platform not supported") |
||||||
|
|
@ -0,0 +1,119 @@ |
|||||||
|
## |
||||||
|
## For list of options visit: |
||||||
|
## https://docs.mongodb.org/manual/reference/configuration-options/ |
||||||
|
## |
||||||
|
|
||||||
|
# systemLog Options - How to do logging |
||||||
|
systemLog: |
||||||
|
# The default log message verbosity level for components (0-5) |
||||||
|
verbosity: 0 |
||||||
|
|
||||||
|
# The destination to which MongoDB sends all log output (file|syslog, if not specifed to STDOUT) |
||||||
|
destination: file |
||||||
|
|
||||||
|
# Log file to send write to instead of stdout - has to be a file, not directory |
||||||
|
path: /var/log/mongodb/mongod.log |
||||||
|
|
||||||
|
# Append to logpath instead of over-writing (false by default) |
||||||
|
logAppend: true |
||||||
|
|
||||||
|
# Set the log rotation behavior (rename|reopen, rename by default) |
||||||
|
logRotate: reopen |
||||||
|
|
||||||
|
|
||||||
|
# processManagement Options - How the process runs |
||||||
|
processManagement: |
||||||
|
# Fork server process (false by default) |
||||||
|
fork: true |
||||||
|
|
||||||
|
# Full path to pidfile (if not set, no pidfile is created) |
||||||
|
pidFilePath: /var/run/mongodb/mongod.pid |
||||||
|
|
||||||
|
|
||||||
|
# net Options - Network interfaces settings |
||||||
|
net: |
||||||
|
# Specify port number (27017 by default) |
||||||
|
port: 27017 |
||||||
|
|
||||||
|
# Comma separated list of ip addresses to listen on (all local ips by default) |
||||||
|
bindIp: 127.0.0.1,::1 |
||||||
|
|
||||||
|
# Enable IPv6 support (disabled by default) |
||||||
|
ipv6: true |
||||||
|
|
||||||
|
unixDomainSocket: |
||||||
|
# Enable/disable listening on the UNIX domain socket (true by default) |
||||||
|
enabled: true |
||||||
|
|
||||||
|
# Alternative directory for UNIX domain sockets (defaults to /tmp) |
||||||
|
pathPrefix: /var/run/mongodb |
||||||
|
|
||||||
|
#ssl: |
||||||
|
# Set the SSL operation mode (disabled|allowSSL|preferSSL|requireSSL) |
||||||
|
#mode: <string> |
||||||
|
|
||||||
|
# PEM file for ssl |
||||||
|
#PEMKeyFile: <string> |
||||||
|
|
||||||
|
# Certificate Authority file for SSL |
||||||
|
#CAFile: <string> |
||||||
|
|
||||||
|
|
||||||
|
# storage Options - How and Where to store data |
||||||
|
storage: |
||||||
|
# Directory for datafiles (defaults to /data/db/) |
||||||
|
dbPath: /var/lib/mongodb |
||||||
|
|
||||||
|
#journal: |
||||||
|
# Enable/Disable journaling (journaling is on by default for 64 bit) |
||||||
|
#enabled: true |
||||||
|
|
||||||
|
# The storage engine for the mongod database (mmapv1|wiredTiger, wiredTiger by default |
||||||
|
# - works for 64 bit only) |
||||||
|
# Also possible to use unstable engines: devnull|ephemeralForTest |
||||||
|
engine: mmapv1 |
||||||
|
|
||||||
|
#mmapv1: |
||||||
|
# Enable or disable the preallocation of data files (true by default) |
||||||
|
#preallocDataFiles: <boolean> |
||||||
|
|
||||||
|
# Use a smaller default file size (false by default) |
||||||
|
#smallFiles: <boolean> |
||||||
|
|
||||||
|
#wiredTiger: |
||||||
|
#engineConfig: |
||||||
|
# The maximum size of the cache that WiredTiger will use for all data |
||||||
|
# (max(60% of RAM - 1GB, 1GB) by default) |
||||||
|
#cacheSizeGB: 5 |
||||||
|
|
||||||
|
# The type of compression to use to compress WiredTiger journal data |
||||||
|
# (none|snappy|zlib, snappy by default) |
||||||
|
#journalCompressor: <string> |
||||||
|
|
||||||
|
#collectionConfig: |
||||||
|
# The default type of compression to use to compress collection data |
||||||
|
# (none|snappy|zlib, snappy by default) |
||||||
|
#blockCompressor: <string> |
||||||
|
|
||||||
|
|
||||||
|
# secutiry Options - Authorization and other security settings |
||||||
|
#security: |
||||||
|
# Private key for cluster authentication |
||||||
|
#keyFile: <string> |
||||||
|
|
||||||
|
# Run with/without security (enabled|disabled, disabled by default) |
||||||
|
#authorization |
||||||
|
|
||||||
|
|
||||||
|
# setParameter Options - Set MongoDB server parameters |
||||||
|
# setParameter: |
||||||
|
|
||||||
|
# opratrionProfiling Options - Profiling settings |
||||||
|
#operationProfiling: |
||||||
|
|
||||||
|
# replication Options - ReplSet settings |
||||||
|
#replication: |
||||||
|
|
||||||
|
# sharding Options - Shard settings |
||||||
|
#sharding: |
||||||
|
|
@ -0,0 +1,170 @@ |
|||||||
|
#!/bin/sh |
||||||
|
# |
||||||
|
# mongod init file for starting up the mongoDB server |
||||||
|
# |
||||||
|
# chkconfig: - 90 10 |
||||||
|
# description: Starts and stops the mongoDB daemon that handles all \ |
||||||
|
# database requests. |
||||||
|
|
||||||
|
# Source function library. |
||||||
|
. /etc/rc.d/init.d/functions |
||||||
|
|
||||||
|
prog="mongod" |
||||||
|
exec="/usr/bin/$prog" |
||||||
|
logfile=${LOGFILE-/var/log/mongodb/$prog.log} |
||||||
|
|
||||||
|
[ -e /etc/sysconfig/$prog ] && . /etc/sysconfig/$prog |
||||||
|
|
||||||
|
pidfile=${PIDFILE-/var/run/mongodb/$prog.pid} |
||||||
|
options="$OPTIONS" |
||||||
|
lockfile="/var/lock/subsys/$prog" |
||||||
|
|
||||||
|
# Nicer version of killproc that does not kill mongodb when it takes |
||||||
|
# a long time to shut down and does not hang for a long time when mongo |
||||||
|
# shuts down quickly |
||||||
|
killproc_nice() { |
||||||
|
local RC base pid pid_file= delay i |
||||||
|
|
||||||
|
RC=0; delay=3 |
||||||
|
# Test syntax. |
||||||
|
if [ "$#" -eq 0 ]; then |
||||||
|
echo $"Usage: killproc [-p pidfile] [ -d delay] {program} [-signal]" |
||||||
|
return 1 |
||||||
|
fi |
||||||
|
if [ "$1" = "-p" ]; then |
||||||
|
pid_file=$2 |
||||||
|
shift 2 |
||||||
|
fi |
||||||
|
if [ "$1" = "-d" ]; then |
||||||
|
delay=$2 |
||||||
|
shift 2 |
||||||
|
fi |
||||||
|
|
||||||
|
# Save basename. |
||||||
|
base=${1##*/} |
||||||
|
|
||||||
|
# Find pid. |
||||||
|
__pids_var_run "$1" "$pid_file" |
||||||
|
RC=$? |
||||||
|
if [ -z "$pid" ]; then |
||||||
|
if [ -z "$pid_file" ]; then |
||||||
|
pid="$(__pids_pidof "$1")" |
||||||
|
else |
||||||
|
[ "$RC" = "4" ] && { failure $"$base shutdown" ; return $RC ;} |
||||||
|
fi |
||||||
|
fi |
||||||
|
|
||||||
|
# Kill it. |
||||||
|
if [ -n "$pid" ] ; then |
||||||
|
[ "$BOOTUP" = "verbose" -a -z "${LSB:-}" ] && echo -n "$base " |
||||||
|
if checkpid $pid 2>&1; then |
||||||
|
# TERM first, then KILL if not dead |
||||||
|
kill -TERM $pid >/dev/null 2>&1 |
||||||
|
usleep 100000 |
||||||
|
|
||||||
|
# Check every one second if the program is stopped. |
||||||
|
# Do so for a maximum of $delay seconds |
||||||
|
for ((i = 0 ; i < $delay; i++)) |
||||||
|
do |
||||||
|
if checkpid $pid; then |
||||||
|
sleep 1 |
||||||
|
else |
||||||
|
break |
||||||
|
fi |
||||||
|
done |
||||||
|
|
||||||
|
# If the program is not stopped, kill it |
||||||
|
if checkpid $pid ; then |
||||||
|
kill -KILL $pid >/dev/null 2>&1 |
||||||
|
usleep 100000 |
||||||
|
fi |
||||||
|
fi |
||||||
|
checkpid $pid |
||||||
|
RC=$? |
||||||
|
[ "$RC" -eq 0 ] && failure $"$base shutdown" || success $"$base shutdown" |
||||||
|
RC=$((! $RC)) |
||||||
|
else |
||||||
|
failure $"$base shutdown" |
||||||
|
RC=0 |
||||||
|
fi |
||||||
|
|
||||||
|
# Remove pid file if any. |
||||||
|
rm -f "${pid_file:-/var/run/$base.pid}" |
||||||
|
return $RC |
||||||
|
} |
||||||
|
|
||||||
|
start() { |
||||||
|
[ -x $exec ] || exit 5 |
||||||
|
[ "$(id -u)" -eq 0 ] || exit 4 |
||||||
|
echo -n $"Starting $prog: " |
||||||
|
daemon --pidfile=${pidfile} --user mongodb "$exec $options run >> $logfile 2>&1" |
||||||
|
retval=$? |
||||||
|
echo |
||||||
|
[ $retval -eq 0 ] && touch $lockfile |
||||||
|
return $retval |
||||||
|
} |
||||||
|
|
||||||
|
stop() { |
||||||
|
[ "$(id -u)" -eq 0 ] || exit 4 |
||||||
|
echo -n $"Stopping $prog: " |
||||||
|
killproc_nice -p ${pidfile} -d 300 $prog |
||||||
|
retval=$? |
||||||
|
echo |
||||||
|
[ $retval -eq 0 ] && rm -f $lockfile |
||||||
|
return $retval |
||||||
|
} |
||||||
|
|
||||||
|
restart() { |
||||||
|
stop |
||||||
|
start |
||||||
|
} |
||||||
|
|
||||||
|
reload() { |
||||||
|
restart |
||||||
|
} |
||||||
|
|
||||||
|
force_reload() { |
||||||
|
restart |
||||||
|
} |
||||||
|
|
||||||
|
rh_status() { |
||||||
|
# run checks to determine if the service is running or use generic status |
||||||
|
status -p ${pidfile} $prog |
||||||
|
} |
||||||
|
|
||||||
|
rh_status_q() { |
||||||
|
rh_status >/dev/null 2>&1 |
||||||
|
} |
||||||
|
|
||||||
|
|
||||||
|
case "$1" in |
||||||
|
start) |
||||||
|
rh_status_q && exit 0 |
||||||
|
$1 |
||||||
|
;; |
||||||
|
stop) |
||||||
|
rh_status_q || exit 0 |
||||||
|
$1 |
||||||
|
;; |
||||||
|
restart) |
||||||
|
$1 |
||||||
|
;; |
||||||
|
reload) |
||||||
|
rh_status_q || exit 7 |
||||||
|
$1 |
||||||
|
;; |
||||||
|
force-reload) |
||||||
|
force_reload |
||||||
|
;; |
||||||
|
status) |
||||||
|
rh_status |
||||||
|
;; |
||||||
|
condrestart|try-restart) |
||||||
|
rh_status_q || exit 0 |
||||||
|
restart |
||||||
|
;; |
||||||
|
*) |
||||||
|
echo $"Usage: $0 {start|stop|status|restart|condrestart|try-restart|reload|force-reload}" |
||||||
|
exit 2 |
||||||
|
esac |
||||||
|
exit $? |
@ -0,0 +1,15 @@ |
|||||||
|
[Unit] |
||||||
|
Description=High-performance, schema-free document-oriented database |
||||||
|
After=syslog.target network.target |
||||||
|
|
||||||
|
[Service] |
||||||
|
Type=forking |
||||||
|
User=mongodb |
||||||
|
EnvironmentFile=/etc/sysconfig/mongod |
||||||
|
ExecStart=/bin/sh -c "exec $NUMACTL /usr/bin/mongod $OPTIONS run" |
||||||
|
PrivateTmp=true |
||||||
|
LimitNOFILE=64000 |
||||||
|
TimeoutStartSec=180 |
||||||
|
|
||||||
|
[Install] |
||||||
|
WantedBy=multi-user.target |
@ -0,0 +1,5 @@ |
|||||||
|
OPTIONS="-f /etc/mongod.conf" |
||||||
|
|
||||||
|
# To run numactl before starting mongodb server |
||||||
|
# https://docs.mongodb.com/manual/administration/production-notes/#configuring-numa-on-linux |
||||||
|
#NUMACTL="/usr/bin/numactl --interleave=all" |
@ -0,0 +1,3 @@ |
|||||||
|
# make sure the mongodb dir is owned by mongodb so the process running as |
||||||
|
# mongodb can write the pid there |
||||||
|
d /run/mongodb 0755 mongodb root - |
@ -0,0 +1,12 @@ |
|||||||
|
/var/log/mongodb/*.log { |
||||||
|
weekly |
||||||
|
rotate 10 |
||||||
|
copytruncate |
||||||
|
delaycompress |
||||||
|
compress |
||||||
|
notifempty |
||||||
|
missingok |
||||||
|
postrotate |
||||||
|
/bin/kill -USR1 `cat /var/run/mongodb/mongod.pid 2>/dev/null` 2> /dev/null|| true |
||||||
|
endscript |
||||||
|
} |
@ -0,0 +1,86 @@ |
|||||||
|
## |
||||||
|
## For list of options visit: |
||||||
|
## https://docs.mongodb.org/manual/reference/configuration-options/ |
||||||
|
## |
||||||
|
|
||||||
|
# systemLog Options - How to do logging |
||||||
|
systemLog: |
||||||
|
# The default log message verbosity level for components (0-5) |
||||||
|
verbosity: 0 |
||||||
|
|
||||||
|
# The destination to which MongoDB sends all log output (file|syslog, if not specifed to STDOUT) |
||||||
|
destination: file |
||||||
|
|
||||||
|
# Log file to send write to instead of stdout - has to be a file, not directory |
||||||
|
path: /var/log/mongodb/mongod.log |
||||||
|
|
||||||
|
# Append to logpath instead of over-writing (false by default) |
||||||
|
logAppend: true |
||||||
|
|
||||||
|
# Set the log rotation behavior (rename|reopen, rename by default) |
||||||
|
logRotate: reopen |
||||||
|
|
||||||
|
|
||||||
|
# processManagement Options - How the process runs |
||||||
|
processManagement: |
||||||
|
# Fork server process (false by default) |
||||||
|
fork: true |
||||||
|
|
||||||
|
# Full path to pidfile (if not set, no pidfile is created) |
||||||
|
pidFilePath: /var/run/mongodb/mongod.pid |
||||||
|
|
||||||
|
|
||||||
|
# net Options - Network interfaces settings |
||||||
|
net: |
||||||
|
# Specify port number (27017 by default) |
||||||
|
port: 27017 |
||||||
|
|
||||||
|
# Comma separated list of ip addresses to listen on (all local ips by default) |
||||||
|
bindIp: 127.0.0.1,::1 |
||||||
|
|
||||||
|
# Enable IPv6 support (disabled by default) |
||||||
|
ipv6: true |
||||||
|
|
||||||
|
unixDomainSocket: |
||||||
|
# Enable/disable listening on the UNIX domain socket (true by default) |
||||||
|
enabled: true |
||||||
|
|
||||||
|
# Alternative directory for UNIX domain sockets (defaults to /tmp) |
||||||
|
pathPrefix: /var/run/mongodb |
||||||
|
|
||||||
|
#ssl: |
||||||
|
# Set the SSL operation mode (disabled|allowSSL|preferSSL|requireSSL) |
||||||
|
#mode: <string> |
||||||
|
|
||||||
|
# PEM file for ssl |
||||||
|
#PEMKeyFile: <string> |
||||||
|
|
||||||
|
# Certificate Authority file for SSL |
||||||
|
#CAFile: <string> |
||||||
|
|
||||||
|
|
||||||
|
# secutiry Options - Authorization and other security settings |
||||||
|
#security: |
||||||
|
# Private key for cluster authentication |
||||||
|
#keyFile: <string> |
||||||
|
|
||||||
|
|
||||||
|
# sharding Options - Shard settings |
||||||
|
#sharding: |
||||||
|
# The configuration servers for the sharded cluster |
||||||
|
# Acceptable form: <config replset name>/<host1:port>,<host2:port>,[...] |
||||||
|
#configDB: <string> |
||||||
|
|
||||||
|
|
||||||
|
# storage Options - How and Where to store data |
||||||
|
#storage: |
||||||
|
|
||||||
|
# setParameter Options - Set MongoDB server parameters |
||||||
|
# setParameter: |
||||||
|
|
||||||
|
# opratrionProfiling Options - Profiling settings |
||||||
|
#operationProfiling: |
||||||
|
|
||||||
|
# replication Options - ReplSet settings |
||||||
|
#replication: |
||||||
|
|
@ -0,0 +1,170 @@ |
|||||||
|
#!/bin/sh |
||||||
|
# |
||||||
|
# mongos init file for starting up the mongoDB shard server |
||||||
|
# |
||||||
|
# chkconfig: - 90 10 |
||||||
|
# description: Starts and stops the mongoDB shard daemon that handles all \ |
||||||
|
# database requests. |
||||||
|
|
||||||
|
# Source function library. |
||||||
|
. /etc/rc.d/init.d/functions |
||||||
|
|
||||||
|
prog="mongos" |
||||||
|
exec="/usr/bin/$prog" |
||||||
|
logfile=${LOGFILE-/var/log/mongodb/$prog.log} |
||||||
|
|
||||||
|
[ -e /etc/sysconfig/$prog ] && . /etc/sysconfig/$prog |
||||||
|
|
||||||
|
pidfile=${PIDFILE-/var/run/mongodb/$prog.pid} |
||||||
|
options="$OPTIONS" |
||||||
|
lockfile="/var/lock/subsys/$prog" |
||||||
|
|
||||||
|
# Nicer version of killproc that does not kill mongodb when it takes |
||||||
|
# a long time to shut down and does not hang for a long time when mongo |
||||||
|
# shuts down quickly |
||||||
|
killproc_nice() { |
||||||
|
local RC base pid pid_file= delay i |
||||||
|
|
||||||
|
RC=0; delay=3 |
||||||
|
# Test syntax. |
||||||
|
if [ "$#" -eq 0 ]; then |
||||||
|
echo $"Usage: killproc [-p pidfile] [ -d delay] {program} [-signal]" |
||||||
|
return 1 |
||||||
|
fi |
||||||
|
if [ "$1" = "-p" ]; then |
||||||
|
pid_file=$2 |
||||||
|
shift 2 |
||||||
|
fi |
||||||
|
if [ "$1" = "-d" ]; then |
||||||
|
delay=$2 |
||||||
|
shift 2 |
||||||
|
fi |
||||||
|
|
||||||
|
# Save basename. |
||||||
|
base=${1##*/} |
||||||
|
|
||||||
|
# Find pid. |
||||||
|
__pids_var_run "$1" "$pid_file" |
||||||
|
RC=$? |
||||||
|
if [ -z "$pid" ]; then |
||||||
|
if [ -z "$pid_file" ]; then |
||||||
|
pid="$(__pids_pidof "$1")" |
||||||
|
else |
||||||
|
[ "$RC" = "4" ] && { failure $"$base shutdown" ; return $RC ;} |
||||||
|
fi |
||||||
|
fi |
||||||
|
|
||||||
|
# Kill it. |
||||||
|
if [ -n "$pid" ] ; then |
||||||
|
[ "$BOOTUP" = "verbose" -a -z "${LSB:-}" ] && echo -n "$base " |
||||||
|
if checkpid $pid 2>&1; then |
||||||
|
# TERM first, then KILL if not dead |
||||||
|
kill -TERM $pid >/dev/null 2>&1 |
||||||
|
usleep 100000 |
||||||
|
|
||||||
|
# Check every one second if the program is stopped. |
||||||
|
# Do so for a maximum of $delay seconds |
||||||
|
for ((i = 0 ; i < $delay; i++)) |
||||||
|
do |
||||||
|
if checkpid $pid; then |
||||||
|
sleep 1 |
||||||
|
else |
||||||
|
break |
||||||
|
fi |
||||||
|
done |
||||||
|
|
||||||
|
# If the program is not stopped, kill it |
||||||
|
if checkpid $pid ; then |
||||||
|
kill -KILL $pid >/dev/null 2>&1 |
||||||
|
usleep 100000 |
||||||
|
fi |
||||||
|
fi |
||||||
|
checkpid $pid |
||||||
|
RC=$? |
||||||
|
[ "$RC" -eq 0 ] && failure $"$base shutdown" || success $"$base shutdown" |
||||||
|
RC=$((! $RC)) |
||||||
|
else |
||||||
|
failure $"$base shutdown" |
||||||
|
RC=0 |
||||||
|
fi |
||||||
|
|
||||||
|
# Remove pid file if any. |
||||||
|
rm -f "${pid_file:-/var/run/$base.pid}" |
||||||
|
return $RC |
||||||
|
} |
||||||
|
|
||||||
|
start() { |
||||||
|
[ -x $exec ] || exit 5 |
||||||
|
[ "$(id -u)" -eq 0 ] || exit 4 |
||||||
|
echo -n $"Starting $prog: " |
||||||
|
daemon --pidfile=${pidfile} --user mongodb "$exec $options >> $logfile 2>&1" |
||||||
|
retval=$? |
||||||
|
echo |
||||||
|
[ $retval -eq 0 ] && touch $lockfile |
||||||
|
return $retval |
||||||
|
} |
||||||
|
|
||||||
|
stop() { |
||||||
|
[ "$(id -u)" -eq 0 ] || exit 4 |
||||||
|
echo -n $"Stopping $prog: " |
||||||
|
killproc_nice -p ${pidfile} -d 300 $prog |
||||||
|
retval=$? |
||||||
|
echo |
||||||
|
[ $retval -eq 0 ] && rm -f $lockfile |
||||||
|
return $retval |
||||||
|
} |
||||||
|
|
||||||
|
restart() { |
||||||
|
stop |
||||||
|
start |
||||||
|
} |
||||||
|
|
||||||
|
reload() { |
||||||
|
restart |
||||||
|
} |
||||||
|
|
||||||
|
force_reload() { |
||||||
|
restart |
||||||
|
} |
||||||
|
|
||||||
|
rh_status() { |
||||||
|
# run checks to determine if the service is running or use generic status |
||||||
|
status -p ${pidfile} $prog |
||||||
|
} |
||||||
|
|
||||||
|
rh_status_q() { |
||||||
|
rh_status >/dev/null 2>&1 |
||||||
|
} |
||||||
|
|
||||||
|
|
||||||
|
case "$1" in |
||||||
|
start) |
||||||
|
rh_status_q && exit 0 |
||||||
|
$1 |
||||||
|
;; |
||||||
|
stop) |
||||||
|
rh_status_q || exit 0 |
||||||
|
$1 |
||||||
|
;; |
||||||
|
restart) |
||||||
|
$1 |
||||||
|
;; |
||||||
|
reload) |
||||||
|
rh_status_q || exit 7 |
||||||
|
$1 |
||||||
|
;; |
||||||
|
force-reload) |
||||||
|
force_reload |
||||||
|
;; |
||||||
|
status) |
||||||
|
rh_status |
||||||
|
;; |
||||||
|
condrestart|try-restart) |
||||||
|
rh_status_q || exit 0 |
||||||
|
restart |
||||||
|
;; |
||||||
|
*) |
||||||
|
echo $"Usage: $0 {start|stop|status|restart|condrestart|try-restart|reload|force-reload}" |
||||||
|
exit 2 |
||||||
|
esac |
||||||
|
exit $? |
@ -0,0 +1,15 @@ |
|||||||
|
[Unit] |
||||||
|
Description=High-performance, schema-free document-oriented database |
||||||
|
After=syslog.target network.target |
||||||
|
|
||||||
|
[Service] |
||||||
|
Type=forking |
||||||
|
User=mongodb |
||||||
|
EnvironmentFile=/etc/sysconfig/mongos |
||||||
|
ExecStart=/bin/sh -c "exec $NUMACTL /usr/bin/mongos $OPTIONS" |
||||||
|
PrivateTmp=true |
||||||
|
LimitNOFILE=64000 |
||||||
|
TimeoutStartSec=180 |
||||||
|
|
||||||
|
[Install] |
||||||
|
WantedBy=multi-user.target |
@ -0,0 +1,5 @@ |
|||||||
|
OPTIONS="-f /etc/mongos.conf" |
||||||
|
|
||||||
|
# To run numactl before starting mongodb server |
||||||
|
# https://docs.mongodb.com/manual/administration/production-notes/#configuring-numa-on-linux |
||||||
|
#NUMACTL="/usr/bin/numactl --interleave=all" |
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,85 @@ |
|||||||
|
diff --git a/SConstruct b/SConstruct |
||||||
|
index 52095d8b70..29ffc3ada4 100644 |
||||||
|
--- a/SConstruct |
||||||
|
+++ b/SConstruct |
||||||
|
@@ -1059,6 +1059,7 @@ processor_macros = { |
||||||
|
'arm' : { 'endian': 'little', 'defines': ('__arm__',) }, |
||||||
|
'aarch64' : { 'endian': 'little', 'defines': ('__arm64__', '__aarch64__')}, |
||||||
|
'i386' : { 'endian': 'little', 'defines': ('__i386', '_M_IX86')}, |
||||||
|
+ 'ppc64' : { 'endian': 'big', 'defines': ('__powerpc64__) && defined(__BIG_ENDIAN__',)}, |
||||||
|
'ppc64le' : { 'endian': 'little', 'defines': ('__powerpc64__',)}, |
||||||
|
's390x' : { 'endian': 'big', 'defines': ('__s390x__',)}, |
||||||
|
'sparc' : { 'endian': 'big', 'defines': ('__sparc',)}, |
||||||
|
@@ -3358,7 +3359,7 @@ def doConfigure(myenv): |
||||||
|
# ask each module to configure itself and the build environment. |
||||||
|
moduleconfig.configure_modules(mongo_modules, conf) |
||||||
|
|
||||||
|
- if env['TARGET_ARCH'] == "ppc64le": |
||||||
|
+ if env['TARGET_ARCH'] == "ppc64le" or env['TARGET_ARCH'] == "ppc64": |
||||||
|
# This checks for an altivec optimization we use in full text search. |
||||||
|
# Different versions of gcc appear to put output bytes in different |
||||||
|
# parts of the output vector produced by vec_vbpermq. This configure |
||||||
|
diff --git a/src/third_party/IntelRDFPMathLib20U1/LIBRARY/float128/architecture.h b/src/third_party/IntelRDFPMathLib20U1/LIBRARY/float128/architecture.h |
||||||
|
index 355d70e813..afefe7b1f0 100755 |
||||||
|
--- a/src/third_party/IntelRDFPMathLib20U1/LIBRARY/float128/architecture.h |
||||||
|
+++ b/src/third_party/IntelRDFPMathLib20U1/LIBRARY/float128/architecture.h |
||||||
|
@@ -570,7 +570,7 @@ |
||||||
|
# endif |
||||||
|
|
||||||
|
|
||||||
|
-#elif (defined(__s390x__)) |
||||||
|
+#elif (defined(__s390x__)) || (defined(__powerpc64__) && defined(__BIG_ENDIAN__)) |
||||||
|
|
||||||
|
# undef vax |
||||||
|
# undef mips |
||||||
|
diff --git a/src/third_party/IntelRDFPMathLib20U1/SConscript b/src/third_party/IntelRDFPMathLib20U1/SConscript |
||||||
|
index c8eb827c28..60d7506adc 100644 |
||||||
|
--- a/src/third_party/IntelRDFPMathLib20U1/SConscript |
||||||
|
+++ b/src/third_party/IntelRDFPMathLib20U1/SConscript |
||||||
|
@@ -316,6 +316,9 @@ elif processor == 'x86_64' or processor == 'ppc64le': |
||||||
|
cpp_defines['efi2'] = '1' |
||||||
|
cpp_defines['EFI2'] = '1' |
||||||
|
# Using 64 bit big endian |
||||||
|
+elif processor == 'ppc64': |
||||||
|
+ cpp_defines['ppc64'] = '1' |
||||||
|
+ cpp_defines['BID_BIG_ENDIAN'] = '1' |
||||||
|
elif processor == 's390x': |
||||||
|
cpp_defines['s390x'] = '1' |
||||||
|
cpp_defines['BID_BIG_ENDIAN'] = '1' |
||||||
|
diff --git a/src/third_party/timelib-2018.01alpha1/parse_tz.c b/src/third_party/timelib-2018.01alpha1/parse_tz.c |
||||||
|
index 5986cd6468..18d41254ce 100644 |
||||||
|
--- a/src/third_party/timelib-2018.01alpha1/parse_tz.c |
||||||
|
+++ b/src/third_party/timelib-2018.01alpha1/parse_tz.c |
||||||
|
@@ -38,7 +38,7 @@ |
||||||
|
# endif |
||||||
|
#endif |
||||||
|
|
||||||
|
-#if defined(__s390__) |
||||||
|
+#if defined(__s390__) || defined(__powerpc64__) |
||||||
|
# if __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ |
||||||
|
# define WORDS_BIGENDIAN |
||||||
|
# else |
||||||
|
diff --git a/src/third_party/wiredtiger/SConscript b/src/third_party/wiredtiger/SConscript |
||||||
|
index 40b80a09b6..fac3466aed 100644 |
||||||
|
--- a/src/third_party/wiredtiger/SConscript |
||||||
|
+++ b/src/third_party/wiredtiger/SConscript |
||||||
|
@@ -152,7 +152,7 @@ condition_map = { |
||||||
|
'WINDOWS_HOST' : env.TargetOSIs('windows'), |
||||||
|
|
||||||
|
'ARM64_HOST' : env['TARGET_ARCH'] == 'aarch64', |
||||||
|
- 'POWERPC_HOST' : env['TARGET_ARCH'] == 'ppc64le', |
||||||
|
+ 'POWERPC_HOST' : env['TARGET_ARCH'] == 'ppc64le' or env['TARGET_ARCH'] == 'ppc64', |
||||||
|
'X86_HOST' : env['TARGET_ARCH'] == 'x86_64', |
||||||
|
'ZSERIES_HOST' : env['TARGET_ARCH'] == 's390x', |
||||||
|
} |
||||||
|
@@ -182,6 +182,10 @@ if useSnappy: |
||||||
|
if (get_option("use-s390x-crc32") == "off"): |
||||||
|
env.Append(CPPDEFINES=["HAVE_NO_CRC32_HARDWARE"]) |
||||||
|
|
||||||
|
+# It is not possible to pass ASFLAGS through variables to scons now |
||||||
|
+if env['TARGET_ARCH'] == 'ppc64': |
||||||
|
+ env.Append(ASFLAGS=["-mcpu=power8"]) |
||||||
|
+ |
||||||
|
wtlib = env.Library( |
||||||
|
target="wiredtiger", |
||||||
|
source=wtsources, |
File diff suppressed because it is too large
Load Diff
Loading…
Reference in new issue