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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to