rpuch commented on code in PR #1226:
URL: https://github.com/apache/ignite-3/pull/1226#discussion_r1003458327


##########
modules/table/src/main/java/org/apache/ignite/internal/table/distributed/raft/snapshot/outgoing/OutgoingSnapshotsManager.java:
##########
@@ -65,41 +91,69 @@ public MessagingService messagingService() {
 
     @Override
     public void start() {
-        messagingService.addMessageHandler(TableMessageGroup.class, 
this::messageHandler);
+        executor = Executors.newFixedThreadPool(4, new 
NamedThreadFactory("outgoing-snapshots", LOG));
+
+        messagingService.addMessageHandler(TableMessageGroup.class, 
this::handleMessage);
     }
 
     @Override
     public void stop() throws Exception {
+        IgniteUtils.shutdownAndAwaitTermination(executor, 10, 
TimeUnit.SECONDS);
     }
 
     /**
      * Registers an outgoing snapshot in the manager.
      *
-     * @param snapshotId Snapshot id.
+     * @param snapshotId       Snapshot id.
      * @param outgoingSnapshot Outgoing snapshot.
      */
-    void registerOutgoingSnapshot(UUID snapshotId, OutgoingSnapshot 
outgoingSnapshot) {
-        outgoingSnapshots.put(snapshotId, outgoingSnapshot);
+    @Override
+    public void registerOutgoingSnapshot(UUID snapshotId, OutgoingSnapshot 
outgoingSnapshot) {
+        synchronized (snapshotsLock) {

Review Comment:
   Removed the lock



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