Don't support Gopher if enable io threads to read queries (#7851)
There's currently an issue with IO threads and gopher (issuing lookupKey from within the thread). simply fix is to just not support it for now. (cherry picked from commit 9bdef76f8e3bbfaacf0962ab1ceded1bafa80bda)
This commit is contained in:
parent
9042852ea1
commit
a6f8745127
@ -1519,8 +1519,11 @@ notify-keyspace-events ""
|
||||
#
|
||||
# So use the 'requirepass' option to protect your instance.
|
||||
#
|
||||
# To enable Gopher support uncomment the following line and set
|
||||
# the option from no (the default) to yes.
|
||||
# Note that Gopher is not currently supported when 'io-threads-do-reads'
|
||||
# is enabled.
|
||||
#
|
||||
# To enable Gopher support, uncomment the following line and set the option
|
||||
# from no (the default) to yes.
|
||||
#
|
||||
# gopher-enabled no
|
||||
|
||||
@ -1860,4 +1863,3 @@ jemalloc-bg-thread yes
|
||||
#
|
||||
# Set bgsave child process to cpu affinity 1,10,11
|
||||
# bgsave_cpulist 1,10-11
|
||||
|
||||
|
@ -1884,8 +1884,9 @@ void processInputBuffer(client *c) {
|
||||
if (c->reqtype == PROTO_REQ_INLINE) {
|
||||
if (processInlineBuffer(c) != C_OK) break;
|
||||
/* If the Gopher mode and we got zero or one argument, process
|
||||
* the request in Gopher mode. */
|
||||
if (server.gopher_enabled &&
|
||||
* the request in Gopher mode. To avoid data race, Redis won't
|
||||
* support Gopher if enable io threads to read queries. */
|
||||
if (server.gopher_enabled && !server.io_threads_do_reads &&
|
||||
((c->argc == 1 && ((char*)(c->argv[0]->ptr))[0] == '/') ||
|
||||
c->argc == 0))
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user