You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ignite.apache.org by "ademakov (via GitHub)" <gi...@apache.org> on 2023/06/26 16:38:55 UTC

[GitHub] [ignite-3] ademakov commented on a diff in pull request #2239: IGNITE-19199 Propagate safe time when Meta Storage is idle

ademakov commented on code in PR #2239:
URL: https://github.com/apache/ignite-3/pull/2239#discussion_r1242466447


##########
modules/metastorage/src/main/java/org/apache/ignite/internal/metastorage/impl/MetaStorageLeaderElectionListener.java:
##########
@@ -62,87 +66,108 @@ public class MetaStorageRaftGroupEventsListener implements RaftGroupEventsListen
      *
      * <p>Multi-threaded access is guarded by {@code serializationFutureMux}.
      */
+    @Nullable
     private CompletableFuture<Void> serializationFuture = null;
 
     private final Object serializationFutureMux = new Object();
 
     private final ClusterTimeImpl clusterTime;
 
-    MetaStorageRaftGroupEventsListener(
+    private final LogicalTopologyEventListener logicalTopologyEventListener = new MetaStorageLogicalTopologyEventListener();
+
+    private final MetaStorageConfiguration metaStorageConfiguration;
+
+    /**
+     * Leader term if this node is a leader, {@code null} otherwise.
+     *
+     * <p>Multi-threaded access is guarded by {@code serializationFutureMux}.
+     */
+    @Nullable
+    private Long thisNodeTerm = null;
+
+    MetaStorageLeaderElectionListener(
             IgniteSpinBusyLock busyLock,
             ClusterService clusterService,
             LogicalTopologyService logicalTopologyService,
             CompletableFuture<MetaStorageServiceImpl> metaStorageSvcFut,
-            ClusterTimeImpl clusterTime
+            ClusterTimeImpl clusterTime,
+            MetaStorageConfiguration metaStorageConfiguration
     ) {
         this.busyLock = busyLock;
         this.nodeName = clusterService.nodeName();
         this.logicalTopologyService = logicalTopologyService;
         this.metaStorageSvcFut = metaStorageSvcFut;
         this.clusterTime = clusterTime;
+        this.metaStorageConfiguration = metaStorageConfiguration;
     }
 
     @Override
-    public void onLeaderElected(long term) {
+    public void onLeaderElected(ClusterNode node, long term) {
+        System.err.println("FUCK: " + node + " " + term);

Review Comment:
   Huh?



-- 
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-unsubscribe@ignite.apache.org

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