[DB-2199] Fix write timeout regressions introduced with multi-stream appends - #5699
Conversation
The failure constructor of `WriteEventsCompleted` leaves `FirstEventNumbers` and `LastEventNumbers` empty, so `LowAllocReadOnlyMemory<T>.Single` throws when the write result is not `Success`. Two write completion callbacks read them unconditionally, and the throw happens before the failure handling runs. - `CoreProjectionCheckpointWriter`: a failed checkpoint write is neither retried nor reported as a projection failure. The projection stops processing events and just sits at `Writing (N)` until the node or the projection subsystem is restarted. - `PersistentSubscriptionMessageParker`: a failed park write is not retried and the event is silently lost - neither delivered, nor retried, nor written to the parked stream. The consumer's in-flight slot is leaked too, so enough failed parks and the connection stops receiving messages. Guard both reads on `OperationResult.Success` and add a test for each.
PR Summary by QodoFix write-timeout handling for multi-stream appends (checkpoint + parked writes)
AI Description
Diagram
High-Level Assessment
Files changed (4)
|
Code Review by Qodo🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0)
Great, no issues found!Qodo reviewed your code and found no material issues that require reviewTo customize comments, go to the Qodo configuration screen, or learn more in the docs. |
There was a problem hiding this comment.
🚨 @shaan1337 Failed to create cherry Pick PR due to error:
RequestError [HttpError]: Merge conflict
at /home/runner/work/_actions/kurrent-io/Automations/master/cherry-pick-pr-for-label/node_modules/@octokit/request/dist-node/index.js:66:23
at process.processTicksAndRejections (node:internal/process/task_queues:104:5) {
status: '409',
headers: {
'access-control-allow-origin': '*',
'access-control-expose-headers': 'ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset, Warning',
'content-length': '127',
'content-security-policy': "default-src 'none'",
'content-type': 'application/json; charset=utf-8',
date: 'Wed, 05 Aug 2026 10:03:31 GMT',
'referrer-policy': 'origin-when-cross-origin, strict-origin-when-cross-origin',
server: 'github.com',
'strict-transport-security': 'max-age=31536000; includeSubdomains; preload',
vary: 'Accept-Encoding, Accept, X-Requested-With',
'x-accepted-github-permissions': 'contents=write',
'x-content-type-options': 'nosniff',
'x-frame-options': 'deny',
'x-github-api-version-selected': '2022-11-28',
'x-github-edge-region': 'iad',
'x-github-media-type': 'github.v3; format=json',
'x-github-request-id': 'E7C1:2F4E58:1601F3C:49FD2FD:6A730A73',
'x-ratelimit-limit': '5000',
'x-ratelimit-remaining': '4995',
'x-ratelimit-reset': '1785927808',
'x-ratelimit-resource': 'core',
'x-ratelimit-used': '5',
'x-xss-protection': '0'
},
request: {
method: 'POST',
url: 'https://api.github.com/repos/kurrent-io/KurrentDB/merges',
headers: {
accept: 'application/vnd.github.v3+json',
'user-agent': 'octokit-core.js/3.3.2 Node.js/24',
authorization: 'bearer [REDACTED]',
'content-type': 'application/json; charset=utf-8'
},
body: '{"base":"cherry-pick-cherry-pick/5699/shaan1337/fix-write-timeout-msa-bugs-release/v26.0-087cd9af-0a53-419c-9436-3dfa5dc0b62c","commit_message":"Merge d6c2f3b00a8906686d84f9b5eb313edb02436d27 into cherry-pick-cherry-pick/5699/shaan1337/fix-write-timeout-msa-bugs-release/v26.0-087cd9af-0a53-419c-9436-3dfa5dc0b62c [skip ci]\\n\\n\\nskip-checks: true\\n","head":"d6c2f3b00a8906686d84f9b5eb313edb02436d27"}',
request: { agent: [Agent], hook: [Function: bound bound register] }
},
documentation_url: 'https://docs.github.com/rest/branches/branches#merge-a-branch'
}
🚨👉 Check https://github.com/kurrent-io/KurrentDB/actions/runs/30995845342
There was a problem hiding this comment.
@shaan1337 👉 Created pull request targeting release/v26.1: #5700
No description provided.