valkey
valkey copied to clipboard
Dual-channel-replication: set connection to blocking in child process
Dual-channel file descriptors are set to blocking mode in the main thread, followed by a blocking write. This sets the file descriptors to non-blocking if TLS is used (see connTLSSyncWrite()).
The child process assumes all file descriptors are in blocking mode, so a short-write leads to errors in the replica while loading the RDB.
This change sets file descriptors to blocking in the child process.
Codecov Report
Attention: Patch coverage is 83.33333% with 1 line in your changes missing coverage. Please review.
Project coverage is 70.38%. Comparing base (
b728e41) to head (f0aaae3). Report is 50 commits behind head on unstable.
| Files | Patch % | Lines |
|---|---|---|
| src/replication.c | 50.00% | 1 Missing :warning: |
Additional details and impacted files
@@ Coverage Diff @@
## unstable #862 +/- ##
============================================
- Coverage 70.47% 70.38% -0.09%
============================================
Files 112 112
Lines 61467 61471 +4
============================================
- Hits 43320 43269 -51
- Misses 18147 18202 +55
| Files | Coverage Δ | |
|---|---|---|
| src/rdb.c | 76.24% <100.00%> (-0.12%) |
:arrow_down: |
| src/replication.c | 87.18% <50.00%> (-0.17%) |
:arrow_down: |
@xbasel We can close this right?
i see #837 does not have this change, do we still need it? @naglera
closing as was already implemented as part of #837