RockteMQ-AI commented on issue #11429:
URL: https://github.com/apache/rocketmq/issues/11429#issuecomment-6161340448
**Issue Evaluation**
Category: `type/bug` | Status: **Confirmed**
The reported issue has been verified against the current codebase.
**Root Cause:** `RocksDBSubscriptionGroupManager` persists forbidden state
via `JSON.toJSONString(this.getForbiddenTable().get(group))` in
`updateForbidden`, `setForbidden`, and `clearForbidden` (lines 276-306). When
the last forbidden bit is cleared, `getForbiddenTable().get(group)` returns
`null`, so the stored value becomes the literal string `"null"`. On next
startup, `decodeForbidden` calls `JSON.parseObject("null")` which returns
`null`, causing `NullPointerException` at `jsonObject.entrySet()`. This
propagates up and causes `BrokerStartup` to call `System.exit(-3)` — the broker
refuses to start.
**Impact:** Critical — clearing the last forbidden topic for a group renders
the broker unstartable until the corrupted RocksDB key is manually repaired.
**Severity:** Critical — broker startup failure, requires manual
intervention.
**Proposed Fix:** Guard against `null` before serializing — either skip the
`put` when the forbidden table entry is `null` (and optionally delete the key),
or serialize an empty JSON object `{}` instead of `"null"`.
The analysis is thorough and the reproduction path is clear. Looking forward
to the PR.
---
*Automated evaluation by RockteMQ-AI*
--
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]