perf: add API for updating attachments#157
Conversation
b34cefd to
919800c
Compare
9dfb02b to
16981c9
Compare
Allow clients to send replacement attachment contents to the handler with variable-length IPC messages. The handler writes the updated bytes to the attachment path while keeping attachment registration unchanged. Co-Authored-By: OpenAI Codex <noreply@openai.com>
16981c9 to
b39aaef
Compare
abfe568 to
4774df9
Compare
| // append would make the client block on the work this API is meant to avoid. | ||
| WriteResponse(service_context); | ||
| service_context.delegate()->ExceptionHandlerServerAttachmentAppended( | ||
| attachment, payload); |
There was a problem hiding this comment.
Pipe held during attachment I/O
High Severity
HandleWriteAttachment and HandleAppendAttachment perform disk I/O before ServiceClientConnection returns, so DisconnectNamedPipe is delayed until the write finishes. With only kPipeInstances (2) listeners, a large attachment update can monopolize a pipe thread and stall other IPC, including registrations and crash-related messages.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit 4774df9. Configure here.
4774df9 to
fca5966
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
There are 2 total unresolved issues (including 1 from previous review).
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit fde1cf5. Configure here.


Improve attachment (
__sentry-eventand__sentry-breadcrumbN) update performance on Windows by offloading write/append disk I/O to the crash handler process over IPC.The client side intentionally only waits until the handler accepts the IPC payload, not until the file write completes. For the sake of simplicity, macOS and Linux keep direct file writes behind the same
CrashpadClientAPI because disk I/O is already cheap enough.Required for (see also for concrete numbers):