Files
seaweedfs/weed/mq/kafka/protocol
chrislu e1a4bff794 feat: add context timeout propagation to produce path
This commit adds proper context propagation throughout the produce path,
enabling client-side timeouts to be honored on the broker side. Previously,
only fetch operations respected client timeouts - produce operations continued
indefinitely even if the client gave up.

Changes:
- Add ctx parameter to ProduceRecord and ProduceRecordValue signatures
- Add ctx parameter to PublishRecord and PublishRecordValue in BrokerClient
- Add ctx parameter to handleProduce and related internal functions
- Update all callers (protocol handlers, mocks, tests) to pass context
- Add context cancellation checks in PublishRecord before operations

Benefits:
- Faster failure detection when client times out
- No orphaned publish operations consuming broker resources
- Resource efficiency improvements (no goroutine/stream/lock leaks)
- Consistent timeout behavior between produce and fetch paths
- Better error handling with proper cancellation signals

This fixes the root cause of CI test timeouts where produce operations
continued indefinitely after clients gave up, leading to cascading delays.
2025-10-15 20:31:44 -07:00
..
2025-10-13 18:05:17 -07:00
2025-10-14 18:22:09 -07:00
2025-10-14 17:28:54 -07:00
2025-10-15 20:01:28 -07:00
2025-10-13 18:05:17 -07:00
2025-10-14 19:01:12 -07:00
2025-10-13 18:05:17 -07:00
2025-10-15 20:01:28 -07:00
2025-10-13 18:05:17 -07:00