RockteMQ-AI commented on issue #10421: URL: https://github.com/apache/rocketmq/issues/10421#issuecomment-4689398363
**Issue Evaluation** Category: `type/bug` | Status: **Confirmed** The reported issue has been verified against the codebase description. **Root Cause:** `DELETE_KEY_CACHE_FOR_TIMER` uses `byte[]` as its key type. In Java, `byte[].equals()` performs reference comparison (inherited from `Object.equals()`), not content comparison. This means the cache lookup will never correctly identify a previously-deleted key, allowing a subsequent `UPDATE` record to re-insert a ghost entry into RocksDB after the corresponding `DELETE` was written. **Impact:** Timer message store (RocksDB-backed). Ghost records accumulate when delayed messages are consumed and then undergo CommitLog rotation, leading to potential data inconsistency and wasted storage. **Severity:** Medium — data integrity concern in timer message persistence layer. **Suggested Fix:** Replace `byte[]` key with a content-addressable wrapper (e.g., `ByteBuffer.wrap(byte[])` or a custom key class with proper `equals()`/`hashCode()` based on `Arrays.equals()`/`Arrays.hashCode()`). An automated fix proposal can be generated. Reply `/approve` to proceed with PR generation. --- *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]
