canonical / dqlite

Embeddable, replicated and fault-tolerant SQL engine.
https://dqlite.io
Other
3.77k stars 212 forks source link

uv_writer: Don't skip later KAIO events when one is EAGAIN #652

Closed cole-miller closed 2 weeks ago

cole-miller commented 2 months ago

@marco6 pointed out this return that should be a continue, which causes us to skip processing some KAIO write results if we get several of them in a batch and one of them has status code EAGAIN.

In practice, when running our test suite, it seems that io_getevents never returns more than one event in this context, which together with the dependence on getting EAGAIN explains why we never noticed this while developing dqlite or raft. But in production we could certainly encounter n_events > 1.

Signed-off-by: Cole Miller cole.miller@canonical.com

codecov[bot] commented 2 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 77.43%. Comparing base (14bc162) to head (0710242). Report is 164 commits behind head on master.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #652 +/- ## ========================================== - Coverage 81.22% 77.43% -3.80% ========================================== Files 192 196 +4 Lines 27059 27232 +173 Branches 4981 5440 +459 ========================================== - Hits 21978 21086 -892 - Misses 3487 4290 +803 - Partials 1594 1856 +262 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.