Skip to content

[BUG] Synchronous I/O in clusterSaveConfig #2424

@JimB123

Description

@JimB123

Describe the bug

In clusterSaveConfig(), there are synchronous I/O operations, including close() and rename(). If I/O is delayed or blocked, possibly by disk contention, this may result in large latencies on the Valkey main thread.

We should avoid synchronous I/O from the main thread.

To reproduce

Artificially interrupt disk I/O or saturate disk with other I/O operations. Generate cluster topology changes. Observe tail latencies.

Expected behavior

No additional latencies should be introduced by slow disk I/O.

Additional information

Reference to rename() call:

if (rename(tmpfilename, server.cluster_configfile) == -1) {

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions