Added support of RetryConfig to topic writers#637
Added support of RetryConfig to topic writers#637alex268 merged 10 commits intoydb-platform:masterfrom
Conversation
There was a problem hiding this comment.
Pull request overview
Adds configurable retry behavior to Topic writers by introducing RetryConfig into writer settings and moving the writer stream lifecycle to the shared retryable-stream infrastructure, along with additional tests around shutdown/close behavior and retry scenarios.
Changes:
- Add
RetryConfigsupport toWriterSettingsand wire it into writer stream creation/retry logic. - Refactor writer implementation to use
TopicRetryableStream-basedWriteSession/WriteStream. - Expand tests: buffer-manager close semantics and integration tests that inject failures and validate retries / written data.
Reviewed changes
Copilot reviewed 14 out of 14 changed files in this pull request and generated 9 comments.
Show a summary per file
| File | Description |
|---|---|
| topic/src/main/java/tech/ydb/topic/settings/WriterSettings.java | Adds RetryConfig to writer settings + builder API and default value. |
| topic/src/main/java/tech/ydb/topic/settings/TopicRetryConfig.java | Introduces default retry config used by writers. |
| topic/src/main/java/tech/ydb/topic/impl/TopicRetryableStream.java | Retryable stream base updated (logging, debug id field). |
| topic/src/main/java/tech/ydb/topic/write/impl/WriterImpl.java | Refactors writer lifecycle around WriteSession/retryable streams. |
| topic/src/main/java/tech/ydb/topic/write/impl/WriteSession.java | Migrates session logic to TopicRetryableStream and adds writer callbacks. |
| topic/src/main/java/tech/ydb/topic/write/impl/WriteStream.java | New TopicStream wrapper for write RPC + status parsing. |
| topic/src/main/java/tech/ydb/topic/write/impl/WriterQueue.java | Adds close handling, debug-id logging, and seqNo update behavior tweaks. |
| topic/src/main/java/tech/ydb/topic/write/impl/BufferManager.java | Adds close status + unblocking of waiters and closed checks on acquire paths. |
| topic/src/main/java/tech/ydb/topic/write/impl/MessageSender.java | Adds debug-id logging for request send ranges. |
| topic/src/main/java/tech/ydb/topic/write/impl/EnqueuedMessage.java | Renames error field from encoding-only to generic problem. |
| topic/src/test/java/tech/ydb/topic/write/impl/BufferManagerTest.java | Adds tests validating acquire behavior when buffer is closed. |
| topic/src/test/java/tech/ydb/topic/TopicWritersIntegrationTest.java | New integration test location + retry/failure-injection scenario validation. |
| topic/src/test/java/tech/ydb/topic/FailableWriterInterceptor.java | New gRPC interceptor for injecting init/ack/send failures in tests. |
| topic/src/test/java/tech/ydb/topic/impl/TopicWritersIntegrationTest.java | Removed (relocated to tech.ydb.topic). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #637 +/- ##
============================================
+ Coverage 70.58% 70.86% +0.28%
- Complexity 3291 3310 +19
============================================
Files 372 374 +2
Lines 15640 15699 +59
Branches 1638 1650 +12
============================================
+ Hits 11039 11125 +86
+ Misses 3948 3929 -19
+ Partials 653 645 -8 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 16 out of 16 changed files in this pull request and generated 7 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 16 out of 16 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
No description provided.