You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@rocketmq.apache.org by "123123213weqw (via GitHub)" <gi...@apache.org> on 2026/08/21 11:29:37 UTC

[PR] fix(instance): do not recreate instances deleted during update [rocketmq-dashboard]

123123213weqw opened a new pull request, #2524:
URL: https://github.com/apache/rocketmq-dashboard/pull/2524

   ## What is the purpose of the change
   
   `save()` re-queried the row and fell back to an insert whenever the lookup came up empty. An instance that another request deleted between the service read and this write was resurrected under its old id, and the caller recorded a success audit for an instance that was "deleted".
   
   ## Brief changelog
   
   - a non-null id now always takes the update path in `MybatisPlusInstanceRepository.save`; a zero-row update (the row vanished) is reported as a 409 instead of an insert
   - a null id still inserts, so creation is unchanged
   - tests updated: the absent-row case now asserts the 409 and that no insert happens, and the plain-insert test uses a null id
   
   ## How was this patch verified
   
   - server: `MybatisPlusInstanceRepositoryTest` 16/16 and `InstanceServiceTest` 68/68 green; full `mvn test` ran 1526 tests with only the 7 pre-existing environment failures in the CLI agent tests (missing `sh` binary on a Windows machine, identical on the clean base)
   
   Fixes #2494
   


-- 
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: commits-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] fix(instance): do not recreate instances deleted during update [rocketmq-dashboard]

Posted by "lizhimins (via GitHub)" <gi...@apache.org>.
lizhimins merged PR #2524:
URL: https://github.com/apache/rocketmq-dashboard/pull/2524


-- 
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: commits-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org