smjn commented on code in PR #22635:
URL: https://github.com/apache/kafka/pull/22635#discussion_r3450980654
##########
server/src/main/java/org/apache/kafka/server/share/dlq/ShareGroupDLQStateManager.java:
##########
@@ -185,6 +185,9 @@ public CompletableFuture<Void>
dlq(ShareGroupDLQRecordParameter param) {
// Visibility for tests
CompletableFuture<Void> dlq(ShareGroupDLQRecordParameter param, long
requestBackoffMs, long requestBackoffMaxMs, int maxRequestAttempts) {
+ if (!this.isStarted.get()) {
+ return CompletableFuture.failedFuture(new
IllegalStateException("ShareGroupDLQStateManager is not started."));
+ }
Review Comment:
@apoorvmittal10
Only possible scenario is towards the broker shutdown per the current impl.
Suppose the broker closes the DLQ manager and a new DLQ request comes in, above
check will prevent enqueue. But broker shutdown also closes SharePartition and
DLQ manager so NO change required in those classes.
We do not toggle the DLQ manager.
**This change is more of static hardening**
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]