yyqdbngt opened a new pull request, #5836:
URL: https://github.com/apache/rocketmq-dashboard/pull/5836

   ## Why
   InstanceService.deleteInstance() cleaned metrics data source bindings by the 
instance name only. Data source bindings are persisted exactly as supplied 
(DataSourceDTO accepts any non-blank id) and the instance APIs treat both 
identifier forms as first-class (resolveInstanceId() resolves name-first with a 
numeric-id fallback; the REST delete endpoint resolves numeric ids the same 
way). A data source bound to the legacy numeric id therefore kept a dangling 
binding to the deleted instance forever.
   
   ## What changed
   - removeDataSourceBindings now takes the whole InstanceVO and releases every 
accepted identifier form (canonical name and numeric primary key) from each 
data source's instanceIds.
   
   ## Validation
   - Red-first test 
InstanceServiceTest#deleteInstanceShouldRemoveNumericIdentifierBindingsTest: a 
binding recorded as numeric id and one recorded as the name are both released 
on delete; before the fix only the name-form binding was released.
   - Full InstanceServiceTest suite passes (99 tests, 0 failures).


-- 
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]

Reply via email to