Pil0tXia commented on PR #4344:
URL: https://github.com/apache/eventmesh/pull/4344#issuecomment-1681615940

   I have fixed a new bug: When the `updateWebHookConfig` endpoint is called 
with high concurrency and the `deleteWebHookConfig` endpoint is also called, if 
the `cacheInit` method hasn't completed yet and the webhook configuration file 
is deleted, the `cacheInit` method will throw a 
`java.nio.file.AccessDeniedException`. A more common scenario is that after 
passing the `file.isFile()` validation, the `file` is deleted before the 
`cacheInit` method is called, causing the `cacheInit` method to throw a 
`java.nio.file.NoSuchFileException`.
   
   After the fix, `file.isFile()` and `cacheInit(file)` will become an atomic 
operation, ensuring the validity of the configuration file. This approach 
ensures the eventual consistency of the data, and introducing a task queue can 
further guarantee the sequential consistency of the data. Given the limited 
concurrency of this endpoint, the current synchronization mechanism is already 
fully sufficient.


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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to