Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add io-threads-do-reads config to deprecated config table to have no effect. #1138

Merged
merged 4 commits into from
Oct 10, 2024
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/config.c
Original file line number Diff line number Diff line change
Expand Up @@ -444,6 +444,7 @@ void loadServerConfigFromString(char *config) {
{"list-max-ziplist-entries", 2, 2},
{"list-max-ziplist-value", 2, 2},
{"lua-replicate-commands", 2, 2},
{"io-threads-do-reads", 2, 2},
{NULL, 0},
};
char buf[1024];
Expand Down Expand Up @@ -3086,7 +3087,6 @@ standardConfig static_configs[] = {
/* Bool configs */
createBoolConfig("rdbchecksum", NULL, IMMUTABLE_CONFIG, server.rdb_checksum, 1, NULL, NULL),
createBoolConfig("daemonize", NULL, IMMUTABLE_CONFIG, server.daemonize, 0, NULL, NULL),
createBoolConfig("io-threads-do-reads", NULL, DEBUG_CONFIG | IMMUTABLE_CONFIG, server.io_threads_do_reads, 1, NULL, NULL), /* Read + parse from threads */
createBoolConfig("always-show-logo", NULL, IMMUTABLE_CONFIG, server.always_show_logo, 0, NULL, NULL),
createBoolConfig("protected-mode", NULL, MODIFIABLE_CONFIG, server.protected_mode, 1, NULL, NULL),
createBoolConfig("rdbcompression", NULL, MODIFIABLE_CONFIG, server.rdb_compression, 1, NULL, NULL),
Expand Down
1 change: 0 additions & 1 deletion src/io_threads.c
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,6 @@ void initIOThreads(void) {

int trySendReadToIOThreads(client *c) {
if (server.active_io_threads_num <= 1) return C_ERR;
if (!server.io_threads_do_reads) return C_ERR;
/* If IO thread is areadty reading, return C_OK to make sure the main thread will not handle it. */
if (c->io_read_state != CLIENT_IDLE) return C_OK;
/* Currently, replica/master writes are not offloaded and are processed synchronously. */
Expand Down
1 change: 0 additions & 1 deletion src/server.h
Original file line number Diff line number Diff line change
Expand Up @@ -1744,7 +1744,6 @@ struct valkeyServer {
_Atomic uint64_t next_client_id; /* Next client unique ID. Incremental. */
int protected_mode; /* Don't accept external connections. */
int io_threads_num; /* Number of IO threads to use. */
int io_threads_do_reads; /* Read and parse from IO threads? */
int active_io_threads_num; /* Current number of active IO threads, includes main thread. */
int events_per_io_thread; /* Number of events on the event loop to trigger IO threads activation. */
int prefetch_batch_max_size; /* Maximum number of keys to prefetch in a single batch */
Expand Down
1 change: 0 additions & 1 deletion tests/unit/introspection.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -514,7 +514,6 @@ start_server {tags {"introspection"}} {
set skip_configs {
rdbchecksum
daemonize
io-threads-do-reads
tcp-backlog
always-show-logo
syslog-enabled
Expand Down
6 changes: 5 additions & 1 deletion valkey.conf
Original file line number Diff line number Diff line change
Expand Up @@ -1354,7 +1354,11 @@ lazyfree-lazy-user-flush yes
#
# prefetch-batch-max-size 16
#
# NOTE: If you want to test the server speedup using valkey-benchmark, make
# NOTE:
# 1. 'io-threads-do-reads' config is deprecated and will be removed in the future,
# please avoid using this option if possible.
enjoy-binbin marked this conversation as resolved.
Show resolved Hide resolved
#
# 2. If you want to test the server speedup using valkey-benchmark, make
# sure you also run the benchmark itself in threaded mode, using the
# --threads option to match the number of server threads, otherwise you'll not
# be able to notice the improvements.
Expand Down
Loading