Mmuzaf commented on code in PR #3267:
URL: https://github.com/apache/cassandra/pull/3267#discussion_r1582195614


##########
src/java/org/apache/cassandra/db/ColumnFamilyStore.java:
##########
@@ -508,12 +510,15 @@ public ColumnFamilyStore(Keyspace keyspace,
 
         // Create Memtable and its metrics object only on online
         Memtable initialMemtable = null;
-        TableMetrics.ReleasableMetric memtableMetrics = null;
         if (DatabaseDescriptor.isDaemonInitialized())
         {
             initialMemtable = createMemtable(new 
AtomicReference<>(CommitLog.instance.getCurrentPosition()));
-            memtableMetrics = memtableFactory.createMemtableMetrics(metadata);
+            this.memtableMetrics = 
memtableFactory.createMemtableMetrics(metadata);
         }
+        else
+            this.memtableMetrics = null;
+
+        metric = new TableMetrics(this);

Review Comment:
   Yes, I've added an extra comment for that. The initialization of metrics is 
critical, depending on which line they are created from. 



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