kadirozde commented on code in PR #1999:
URL: https://github.com/apache/phoenix/pull/1999#discussion_r1794437772


##########
phoenix-core/src/it/java/org/apache/phoenix/end2end/TableTTLIT.java:
##########
@@ -261,25 +261,35 @@ public void 
testMinorCompactionShouldNotRetainCellsWhenMaxLookbackIsDisabled()
             final int flushCount = 10;
             byte[] row = Bytes.toBytes("a");
             int rowUpdateCounter = 0;
-            for (int i = 0; i < flushCount; i++) {
-                // Generate more row versions than the maximum cell versions 
for the table
-                int updateCount = RAND.nextInt(10) + versions;
-                rowUpdateCounter += updateCount;
-                for (int j = 0; j < updateCount; j++) {
-                    updateRow(conn, tableName, "a");
+            try {
+                for (int i = 0; i < flushCount; i++) {
+                    // Generate more row versions than the maximum cell 
versions for the table
+                    int updateCount = RAND.nextInt(10) + versions;
+                    rowUpdateCounter += updateCount;
+                    LOG.info(String.format("Iteration:%d uc:%d cntr:%d",
+                            i, updateCount, rowUpdateCounter));
+                    for (int j = 0; j < updateCount; j++) {
+                        updateRow(conn, tableName, "a");
+                        // Sometimes multiple updates to the same row are done 
in the same millisecond
+                        // This results in overwriting the previous version 
which breaks the test
+                        Thread.sleep(1);
+                    }
+                    flush(TableName.valueOf(tableName));
+                    // Flushes dump and retain all the cells to HFile.
+                    // Doing MAX_COLUMN_INDEX + 1 to account for empty cells
+                    assertEquals(TestUtil.getRawCellCount(conn, 
TableName.valueOf(tableName), row),
+                            rowUpdateCounter * (MAX_COLUMN_INDEX + 1));
                 }
-                flush(TableName.valueOf(tableName));
-                // Flushes dump and retain all the cells to HFile.
-                // Doing MAX_COLUMN_INDEX + 1 to account for empty cells
-                assertEquals(TestUtil.getRawCellCount(conn, 
TableName.valueOf(tableName), row),
-                        rowUpdateCounter * (MAX_COLUMN_INDEX + 1));
+                TestUtil.dumpTable(conn, TableName.valueOf(tableName));

Review Comment:
   I think dumpTable was not intentionally left in the earlier commit. We can 
remove its occurrences.



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