qiong-zhou commented on issue #17646:
URL: 
https://github.com/apache/dolphinscheduler/issues/17646#issuecomment-3514724012

   @ruanwenjun I've integrated jdbc-registry in my project, so I'm wondering 
whether this improvement will add transaction support to this method, thereby 
making it atomic?
   ```java
       @Override
       public void deleteJdbcRegistryDataByKey(String key) {
           checkNotNull(key);
           // todo: this is not atomic, need to be improved
           Optional<JdbcRegistryDataDTO> jdbcRegistryDataOptional = 
jdbcRegistryDataRepository.selectByKey(key);
           if (!jdbcRegistryDataOptional.isPresent()) {
               return;
           }
           jdbcRegistryDataRepository.deleteByKey(key);
           final JdbcRegistryDataChangeEventDTO registryDataChangeEvent = 
JdbcRegistryDataChangeEventDTO.builder()
                   .jdbcRegistryData(jdbcRegistryDataOptional.get())
                   .eventType(JdbcRegistryDataChangeEventDTO.EventType.DELETE)
                   .createTime(new Date())
                   .build();
           
jdbcRegistryDataChangeEventRepository.insert(registryDataChangeEvent);
       }
   ```


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