xtern commented on code in PR #7686:
URL: https://github.com/apache/ignite-3/pull/7686#discussion_r2882261534


##########
modules/table/src/integrationTest/java/org/apache/ignite/internal/table/ItPartitionTableStatsMetricTest.java:
##########
@@ -77,27 +66,30 @@ void dropTables() {
      */
     @Test
     void twoTablesInTheSameZone() {
-        String tab1 = "T1";
-        String tab2 = "T2";
+        String t1 = "T1";
+        String t2 = "T2";
 
         sqlScript(
-                format("CREATE TABLE {}(id INT PRIMARY KEY, val INT) ZONE 
{};", tab1, ZONE_1_PART_NO_REPLICAS),
-                format("CREATE TABLE {}(id INT PRIMARY KEY, val INT) ZONE 
{};", tab2, ZONE_1_PART_NO_REPLICAS)
+                format("CREATE TABLE {}(id INT PRIMARY KEY, val INT) ZONE 
{};", t1, ZONE_1_PART_NO_REPLICAS),
+                format("CREATE TABLE {}(id INT PRIMARY KEY, val INT) ZONE 
{};", t2, ZONE_1_PART_NO_REPLICAS)
         );
+        enableStats(t1);
+        enableStats(t2);
 
-        sql(format("INSERT INTO {} VALUES(0, 0), (1, 1);", tab1));
+        sql(format("INSERT INTO {} VALUES(0, 0), (1, 1);", t1));
 
-        expectModsCount(tab1, 2L);
-        expectNextMilestone(tab1, DEFAULT_MIN_STALE_ROWS_COUNT);
+        expectModsCount(t1, 2L);
+        expectNextMilestone(t1, DEFAULT_MIN_STALE_ROWS_COUNT);
 
-        sql(format("INSERT INTO {} VALUES(0, 0), (1, 1), (2, 2);", tab2));
+        sql(format("INSERT INTO {} VALUES(0, 0), (1, 1), (2, 2);", t2));
 
-        expectModsCount(tab2, 3L);
-        expectNextMilestone(tab2, DEFAULT_MIN_STALE_ROWS_COUNT);
+        expectModsCount(t2, 3L);
+        expectNextMilestone(t2, DEFAULT_MIN_STALE_ROWS_COUNT);
 
-        expectModsCount(tab1, 2L);
+        expectModsCount(t1, 2L);
     }
 
+

Review Comment:
   ```suggestion
   ```



##########
modules/table/src/main/java/org/apache/ignite/internal/table/distributed/TableManager.java:
##########
@@ -1677,7 +1677,7 @@ private void registerPartitionTableStatsMetrics(
 
         try {
             metricManager.registerSource(metricSource);
-            metricManager.enable(metricSource);
+            // Do not enable this Metrics Source by default since it's purpose 
only for live troubleshooting

Review Comment:
   I would prefer to move the comment up one line
   ```
               // Do not enable this Metrics Source by default since it's 
purpose only for live troubleshooting
               metricManager.registerSource(metricSource);
   ```



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