Support stream scale-to-zero drain - #14
Conversation
✅ Coordinator tests passed
Remaining work before public release
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6b831bcfe8
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| refreshRedisHealthAsync() | ||
| return redisHealthCache?.status ?: "UNKNOWN" |
There was a problem hiding this comment.
Treat cold Redis health as degraded
When Redis health is required and the cache is cold or expired, this now kicks off the ping asynchronously and immediately returns UNKNOWN; health() still maps every value except DOWN to overall UP, so the first readiness/deployment check after startup (or after cache expiry) can report healthy even while Redis is unreachable until the background refresh completes. For the /coord/v1/monitoring/health endpoint used by deployment checks, either wait for the ping on a cold cache or treat UNKNOWN as degraded.
Useful? React with 👍 / 👎.
| private fun GroupMetadata.toProducerRoutingResponse(): ProducerRoutingResponse { | ||
| val activeShardKeys = streamShardKeys() | ||
| val activeShardKeys = if (shardCount > 0) streamShardKeys() else emptyList() | ||
| return ProducerRoutingResponse( |
There was a problem hiding this comment.
Allow restarted consumers to tolerate zero-shard routing
Emitting shardCount=0 with an empty shard list makes a drained stream's routing view incompatible with the starter: CoordinatorManagedConsumer.validateInitialRouting() calls CoordinatorRoutingMetadataValidator, which still requires metadata.shardCount > 0 and non-empty shards before the consumer is allowed to start. After a scale-to-zero, any autostarting consumer pod for that group that restarts will fail during bean initialization instead of joining and idling with an empty assignment; the consumer-side validation needs to permit zero-shard routing (or skip this producer-routing validation for consumers).
Useful? React with 👍 / 👎.
Design docs render
|
✅ Coordinator tests passed
Remaining work before public release
|
Summary
Tests