redis: update patches
This commit is contained in:
parent
883bc35039
commit
8c53f64ae1
@ -1,21 +1,23 @@
|
|||||||
--- ../../build/redis/cache/redis-3.2.8/src/bio.c 2017-02-12 16:14:57.000000000 +0100
|
diff -uNr redis-6.0.1/src/bio.c redis-6.0.1.mod/src/bio.c
|
||||||
+++ ./src/bio.c 2017-03-02 22:46:52.999274254 +0100
|
--- redis-6.0.1/src/bio.c 2020-05-02 01:10:20.000000000 +0300
|
||||||
@@ -151,8 +151,8 @@
|
+++ redis-6.0.1.mod/src/bio.c 2020-05-13 12:27:55.204680967 +0300
|
||||||
|
@@ -166,11 +166,6 @@
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
/* Make the thread killable at any time, so that bioKillThreads()
|
- /* Make the thread killable at any time, so that bioKillThreads()
|
||||||
* can work reliably. */
|
- * can work reliably. */
|
||||||
- pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, NULL);
|
- pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, NULL);
|
||||||
- pthread_setcanceltype(PTHREAD_CANCEL_ASYNCHRONOUS, NULL);
|
- pthread_setcanceltype(PTHREAD_CANCEL_ASYNCHRONOUS, NULL);
|
||||||
+ //pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, NULL);
|
-
|
||||||
+ //pthread_setcanceltype(PTHREAD_CANCEL_ASYNCHRONOUS, NULL);
|
|
||||||
|
|
||||||
pthread_mutex_lock(&bio_mutex[type]);
|
pthread_mutex_lock(&bio_mutex[type]);
|
||||||
/* Block SIGALRM so we are sure that only the main thread will
|
/* Block SIGALRM so we are sure that only the main thread will
|
||||||
@@ -213,15 +213,19 @@
|
* receive the watchdog signal. */
|
||||||
|
@@ -266,15 +261,7 @@
|
||||||
int err, j;
|
int err, j;
|
||||||
|
|
||||||
for (j = 0; j < BIO_NUM_OPS; j++) {
|
for (j = 0; j < BIO_NUM_OPS; j++) {
|
||||||
- if (pthread_cancel(bio_threads[j]) == 0) {
|
- if (bio_threads[j] && pthread_cancel(bio_threads[j]) == 0) {
|
||||||
- if ((err = pthread_join(bio_threads[j],NULL)) != 0) {
|
- if ((err = pthread_join(bio_threads[j],NULL)) != 0) {
|
||||||
- serverLog(LL_WARNING,
|
- serverLog(LL_WARNING,
|
||||||
- "Bio thread for job type #%d can be joined: %s",
|
- "Bio thread for job type #%d can be joined: %s",
|
||||||
@ -26,18 +28,6 @@
|
|||||||
- }
|
- }
|
||||||
- }
|
- }
|
||||||
+ pthread_kill(bio_threads[j], 0);
|
+ pthread_kill(bio_threads[j], 0);
|
||||||
+ serverLog(LL_WARNING,
|
+ serverLog(LL_WARNING, "Bio thread for job type #%d terminated",j);
|
||||||
+ "Bio thread for job type #%d terminated",j);
|
|
||||||
+
|
|
||||||
+ //if (pthread_cancel(bio_threads[j]) == 0) {
|
|
||||||
+ // if ((err = pthread_join(bio_threads[j],NULL)) != 0) {
|
|
||||||
+ // serverLog(LL_WARNING,
|
|
||||||
+ // "Bio thread for job type #%d can be joined: %s",
|
|
||||||
+ // j, strerror(err));
|
|
||||||
+ // } else {
|
|
||||||
+ // serverLog(LL_WARNING,
|
|
||||||
+ // "Bio thread for job type #%d terminated",j);
|
|
||||||
+ // }
|
|
||||||
+ //}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
diff -u -r ../redis-5.0.0/redis.conf ./redis.conf
|
diff -uNr redis-6.0.1/redis.conf redis-6.0.1.mod/redis.conf
|
||||||
--- ../redis-5.0.0/redis.conf 2018-10-17 15:31:39.000000000 +0000
|
--- redis-6.0.1/redis.conf 2020-05-02 01:10:20.000000000 +0300
|
||||||
+++ ./redis.conf 2018-10-18 17:33:32.672423453 +0000
|
+++ redis-6.0.1.mod/redis.conf 2020-05-13 12:33:02.474191557 +0300
|
||||||
@@ -98,7 +98,7 @@
|
@@ -98,7 +98,7 @@
|
||||||
# will silently truncate it to the value of /proc/sys/net/core/somaxconn so
|
# will silently truncate it to the value of /proc/sys/net/core/somaxconn so
|
||||||
# make sure to raise both the value of somaxconn and tcp_max_syn_backlog
|
# make sure to raise both the value of somaxconn and tcp_max_syn_backlog
|
||||||
@ -10,7 +10,30 @@ diff -u -r ../redis-5.0.0/redis.conf ./redis.conf
|
|||||||
|
|
||||||
# Unix socket.
|
# Unix socket.
|
||||||
#
|
#
|
||||||
@@ -528,7 +528,7 @@
|
@@ -201,7 +201,7 @@
|
||||||
|
################################# GENERAL #####################################
|
||||||
|
|
||||||
|
# By default Redis does not run as a daemon. Use 'yes' if you need it.
|
||||||
|
-# Note that Redis will write a pid file in /var/run/redis.pid when daemonized.
|
||||||
|
+# Note that Redis will write a pid file in @TERMUX_PREFIX@/var/run/redis.pid when daemonized.
|
||||||
|
daemonize no
|
||||||
|
|
||||||
|
# If you run Redis from upstart or systemd, Redis can interact with your
|
||||||
|
@@ -220,11 +220,11 @@
|
||||||
|
#
|
||||||
|
# When the server runs non daemonized, no pid file is created if none is
|
||||||
|
# specified in the configuration. When the server is daemonized, the pid file
|
||||||
|
-# is used even if not specified, defaulting to "/var/run/redis.pid".
|
||||||
|
+# is used even if not specified, defaulting to "@TERMUX_PREFIX@/var/run/redis.pid".
|
||||||
|
#
|
||||||
|
# Creating a pid file is best effort: if Redis is not able to create it
|
||||||
|
# nothing bad happens, the server will start and run normally.
|
||||||
|
-pidfile /var/run/redis_6379.pid
|
||||||
|
+pidfile @TERMUX_PREFIX@/var/run/redis_6379.pid
|
||||||
|
|
||||||
|
# Specify the server verbosity level.
|
||||||
|
# This can be one of:
|
||||||
|
@@ -797,7 +797,7 @@
|
||||||
################################### CLIENTS ####################################
|
################################### CLIENTS ####################################
|
||||||
|
|
||||||
# Set the max number of connected clients at the same time. By default
|
# Set the max number of connected clients at the same time. By default
|
||||||
@ -19,7 +42,7 @@ diff -u -r ../redis-5.0.0/redis.conf ./redis.conf
|
|||||||
# able to configure the process file limit to allow for the specified limit
|
# able to configure the process file limit to allow for the specified limit
|
||||||
# the max number of allowed clients is set to the current file limit
|
# the max number of allowed clients is set to the current file limit
|
||||||
# minus 32 (as Redis reserves a few file descriptors for internal uses).
|
# minus 32 (as Redis reserves a few file descriptors for internal uses).
|
||||||
@@ -536,7 +536,7 @@
|
@@ -805,7 +805,7 @@
|
||||||
# Once the limit is reached Redis will close all the new connections sending
|
# Once the limit is reached Redis will close all the new connections sending
|
||||||
# an error 'max number of clients reached'.
|
# an error 'max number of clients reached'.
|
||||||
#
|
#
|
||||||
|
@ -1,21 +1,12 @@
|
|||||||
diff -u -r ../redis-5.0.0/src/server.h ./src/server.h
|
diff -uNr redis-6.0.1/src/server.h redis-6.0.1.mod/src/server.h
|
||||||
--- ../redis-5.0.0/src/server.h 2018-10-17 15:31:39.000000000 +0000
|
--- redis-6.0.1/src/server.h 2020-05-02 01:10:20.000000000 +0300
|
||||||
+++ ./src/server.h 2018-10-18 17:32:04.424841206 +0000
|
+++ redis-6.0.1.mod/src/server.h 2020-05-13 12:31:16.199918079 +0300
|
||||||
@@ -84,7 +84,7 @@
|
@@ -106,7 +106,7 @@
|
||||||
#define CONFIG_MAX_HZ 500
|
#define RDB_EOF_MARK_SIZE 40
|
||||||
#define MAX_CLIENTS_PER_CLOCK_TICK 200 /* HZ is adapted based on that. */
|
#define CONFIG_REPL_BACKLOG_MIN_SIZE (1024*16) /* 16k */
|
||||||
#define CONFIG_DEFAULT_SERVER_PORT 6379 /* TCP port. */
|
#define CONFIG_BGSAVE_RETRY_DELAY 5 /* Wait a few secs before trying again. */
|
||||||
-#define CONFIG_DEFAULT_TCP_BACKLOG 511 /* TCP listen backlog. */
|
-#define CONFIG_DEFAULT_PID_FILE "/var/run/redis.pid"
|
||||||
+#define CONFIG_DEFAULT_TCP_BACKLOG 127 /* TCP listen backlog. */
|
+#define CONFIG_DEFAULT_PID_FILE "@TERMUX_PREFIX@/var/run/redis.pid"
|
||||||
#define CONFIG_DEFAULT_CLIENT_TIMEOUT 0 /* Default client timeout: infinite */
|
#define CONFIG_DEFAULT_CLUSTER_CONFIG_FILE "nodes.conf"
|
||||||
#define CONFIG_DEFAULT_DBNUM 16
|
#define CONFIG_DEFAULT_UNIX_SOCKET_PERM 0
|
||||||
#define CONFIG_MAX_LINE 1024
|
#define CONFIG_DEFAULT_LOGFILE ""
|
||||||
@@ -100,7 +100,7 @@
|
|
||||||
#define AOF_READ_DIFF_INTERVAL_BYTES (1024*10)
|
|
||||||
#define CONFIG_DEFAULT_SLOWLOG_LOG_SLOWER_THAN 10000
|
|
||||||
#define CONFIG_DEFAULT_SLOWLOG_MAX_LEN 128
|
|
||||||
-#define CONFIG_DEFAULT_MAX_CLIENTS 10000
|
|
||||||
+#define CONFIG_DEFAULT_MAX_CLIENTS 512
|
|
||||||
#define CONFIG_AUTHPASS_MAX_LEN 512
|
|
||||||
#define CONFIG_DEFAULT_SLAVE_PRIORITY 100
|
|
||||||
#define CONFIG_DEFAULT_REPL_TIMEOUT 60
|
|
||||||
|
Loading…
Reference in New Issue
Block a user