From 9b4f12509f6f00301d80990bc266221bb68e4573 Mon Sep 17 00:00:00 2001 From: Andrew Purtell Date: Tue, 24 Nov 2026 07:54:58 -0800 Subject: [PATCH] PHOENIX-8116 VarBinaryEncoded1IT should drop tables after each test VarBinaryEncoded1IT runs 16 tests with 16 parameter sets. Each case creates a new table, and most upsert select cases create two. The class creates about 367 tables and drops none until the class ends. Every open region keeps a memstore chunk and copies of the region configuration, so the heap of the shared test JVM grows through the class. In a full run the JVM ran out of heap, ZooKeeper sessions expired, the master and region server aborted, and an OMID test hung until the class timeout. Drop all tables after each test. The test driver does not drop the HBase table when Phoenix drops a table, so drop the Phoenix metadata and then the HBase tables, as AlterTableIT does. Co-Authored-By: Claude Opus 5.5 --- .../apache/phoenix/end2end/VarBinaryEncoded1IT.java | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/phoenix-core/src/it/java/org/apache/phoenix/end2end/VarBinaryEncoded1IT.java b/phoenix-core/src/it/java/org/apache/phoenix/end2end/VarBinaryEncoded1IT.java index 220edee05c4..69b8e4e7f75 100644 --- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/VarBinaryEncoded1IT.java +++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/VarBinaryEncoded1IT.java @@ -34,10 +34,12 @@ import java.util.Arrays; import java.util.Collection; import java.util.Properties; +import org.apache.hadoop.hbase.HConstants; import org.apache.hadoop.hbase.util.Bytes; import org.apache.phoenix.schema.PTableImpl; import org.apache.phoenix.schema.types.PVarbinary; import org.apache.phoenix.util.PropertiesUtil; +import org.junit.After; import org.junit.Assert; import org.junit.Test; import org.junit.experimental.categories.Category; @@ -82,6 +84,15 @@ public VarBinaryEncoded1IT(boolean columnEncoded, String transactionProvider, bo this.isBindStatement = isBindStatement; } + // Each test case creates new tables. Drop them after each case, because hundreds of open + // regions in one class exhaust the heap of the test JVM. The test driver keeps the HBase + // table when Phoenix drops a table, so drop the HBase tables also. + @After + public void dropTables() throws Exception { + deletePriorMetaData(HConstants.LATEST_TIMESTAMP, getUrl()); + disableAndDropNonSystemTables(); + } + @Parameterized.Parameters( name = "VarBinary1IT_columnEncoded={0}, transactionProvider={1}, mutable={2}," + " isBindStatement={3}")