alievmirza commented on code in PR #5696:
URL: https://github.com/apache/ignite-3/pull/5696#discussion_r2060003923


##########
modules/metastorage/src/main/java/org/apache/ignite/internal/metastorage/server/persistence/RocksDbKeyValueStorage.java:
##########
@@ -1092,11 +1092,13 @@ private void addAllToBatch(
      * Adds modified entries to the watch event queue.
      */
     private void queueWatchEvent() {
-        if (recoveryStatus.get() == RecoveryStatus.INITIAL) {
-            // Watches haven't been enabled yet, no need to queue any events, 
they will be replayed upon recovery.
-            updatedEntries.clear();
-        } else {
-            
notifyWatchProcessor(updatedEntries.toNotifyWatchProcessorEvent(rev));
+        synchronized (watchProcessorMutex) {

Review Comment:
   In general, I'm okay with the patch, but we must be careful in the future in 
terms of a potential deadlocks. Now we sync on `writeBatchProtector` and after 
that `watchProcessorMutex`, we must preserve this order. 
   



-- 
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: notifications-unsubscr...@ignite.apache.org

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

Reply via email to