Skip to content

Conversation

@superhx
Copy link
Collaborator

@superhx superhx commented Nov 13, 2025

No description provided.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds overload protection mechanisms to the zerozone2 system to handle high load scenarios more gracefully. The changes introduce queue-based capacity limits, timeout-based task dropping, and retry logic for capacity-constrained operations.

Key changes:

  • Replaces Semaphore-based inflight limiting with BlockingQueue and timeout-based overload detection in SnapshotReadCache
  • Adds blocking queues with capacity limits to RouterInV2 and implements retry logic for queue insertion
  • Implements infinite retry with sleep for OverCapacityException in ObjectRouterChannel
  • Adds exception handling for proxy operations in RouterOutV2
  • Adjusts resource cleanup timing in DefaultLinkRecordDecoder

Reviewed Changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 10 comments.

Show a summary per file
File Description
s3stream/src/main/java/com/automq/stream/s3/cache/SnapshotReadCache.java Implements queue-based overload protection with timeout detection and task dropping mechanism
core/src/main/java/kafka/automq/zerozone/RouterOutV2.java Adds exception handling with proper error responses for failed proxy operations
core/src/main/java/kafka/automq/zerozone/RouterInV2.java Replaces unbounded queue with bounded BlockingQueue and adds blocking put with retry loop
core/src/main/java/kafka/automq/zerozone/ObjectRouterChannel.java Implements synchronous retry loop with sleep for handling capacity exceptions
core/src/main/java/kafka/automq/zerozone/DefaultLinkRecordDecoder.java Moves resource release from finally block to async callback for consistency

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@superhx superhx merged commit 107ae20 into main Nov 13, 2025
6 checks passed
@superhx superhx deleted the overload branch November 13, 2025 03:42
superhx added a commit that referenced this pull request Nov 13, 2025
superhx added a commit that referenced this pull request Nov 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants