RockteMQ-AI commented on issue #2456: URL: https://github.com/apache/rocketmq-dashboard/issues/2456#issuecomment-5358504735
**Issue Evaluation** Category: `bug` | Status: **Confirmed** The reported inconsistency has been verified in `InstanceRepository.findByIdentifier()` (line 42-46). The method passes the raw `identifier` to `findByName()` without trimming, while `findById()` may resolve padded numeric IDs through MyBatis-Plus `selectById`. A named instance with surrounding whitespace (e.g. `" myInstance "`) will miss the `findByName` query because the DB stores the trimmed value. **Root Cause:** `findByIdentifier()` does not normalize (trim) the identifier before passing it to `findByName()` and `findById()`. **Impact:** Instance lookup by identifier fails silently for named instances with whitespace padding. **Severity:** medium The fix should normalize the identifier once (trim) and use the same value for both lookups. --- *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]
