Andrew Kyle Purtell created PHOENIX-8106:
--------------------------------------------
Summary: Region move tests should turn off the balancer
Key: PHOENIX-8106
URL: https://issues.apache.org/jira/browse/PHOENIX-8106
Project: Phoenix
Issue Type: Test
Components: test
Affects Versions: 5.3.2
Reporter: Andrew Kyle Purtell
Assignee: Andrew Kyle Purtell
Fix For: 5.4.0, 5.3.3
Two tests that extend {{ParallelStatsDisabledWithRegionMovesIT}} failed in
GitHub CI. Each failed in 1 run.
{{{}AggregateWithRegionMovesIT.testAvgGroupByDescOrderPreservingWithStats{}}}{*}.{*}
Precommit 44939058841 for PR #2633 (master, NeedsOwnMiniClusterTest A-C),
2026-11-21:
{{java.lang.AssertionError: expected:<13> but was:<12>}}
The assertion reads the guidepost count after {{DELETE FROM SYSTEM.STATS}} and
a major compaction. The server log of this run has these lines (abbreviated):
{{master.HMaster(2106): balance hri=f22651fe...
HBaseAdmin(1404): Trying to major compact ... n\x80\x00\x00\x03 ...
RegionMovedException}}
{{{}UpsertSelectWithRegionMovesIT.testUpsertSelectWithIndex[allowServerSideMutations=false]{}}}{*}.{*}
Precommit 44940096927 for PR #2694 (5.3, NeedsOwnMiniClusterTest Q-Z),
2026-11-21:
{{org.apache.phoenix.schema.TableAlreadyExistsException: ERROR 1013 (42M04):
Table already exists. tableName=N000088}}
The error comes from a plain CREATE TABLE of a new table name, at
{{UpsertSelectWithRegionMovesIT.java:173}} on 5.3. The client throws it from
{{{}MetaDataClient.handleCreateTableMutationCode{}}}. The server log has a
balancer move of the SYSTEM.CATALOG region ({{{}balance hri=9a87c337...{}}}).
Then it has {{{}MetaDataEndpointImpl(3003): createTable failed{}}}, with
{{NotServingRegionException}} ("is closing") from {{{}buildTable{}}}.
The region move tests move regions on their own schedule.
{{moveRegionsOfTable}} runs from the dummy result hook during scans. It waits
up to 3 s for each move, and it skips a move when a region of the table is in
transition. The balancer chore also moves regions, at any time. {{
ParallelStatsDisabledWithRegionMovesIT.doSetup}} does not turn it off. In the
failing runs the balancer made 13 moves (Aggregate) and 19 moves (UpsertSelect).
*Aggregate: a compaction request is lost.* The balancer started a MOVE of the
4th region of the test table. {{TestUtil.doMajorCompaction}} then called
{{{}Admin.majorCompact{}}}. {{HBaseAdmin.compact}} (HBase branch-2.5, lines
1395 to 1407) catches {{NotServingRegionException}} for a region and logs it
only at DEBUG. Here the exception was {{{}RegionMovedException{}}}. The other 3
regions compacted. {{doMajorCompaction}} waits only for its marker row, which
is in region 1. Thus the wait ended, but region 4 did not rewrite its
guideposts, and the count was 12. An earlier analysis said that the wait never
ends. That happens only if the balancer moves region 1, and no log shows it.
HBase documents admin compaction as asynchronous and best effort, so this is a
test defect.
*UpsertSelect: SYSTEM.CATALOG moves during DDL.* The balancer moved the
SYSTEM.CATALOG region during the {{createTable}} endpoint call. The test moves
only its own user tables, so this move came from the balancer. The move exposes
a product window in {{{}MetaDataEndpointImpl.createTable{}}}. The endpoint
commits the rows and then {{buildTable}} fails. The client retry then gets
{{{}TABLE_ALREADY_EXISTS{}}}. That product window has its own filing (see
Related).
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)