[
https://issues.apache.org/jira/browse/PHOENIX-8115?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Andrew Kyle Purtell updated PHOENIX-8115:
-----------------------------------------
Description:
{{UpsertSelectIT}} fails sometimes in its {{@After}} connection leak check. The
failing method is different from run to run.
{noformat}
Tests run: 54, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 256.9 s <<<
FAILURE! -- in org.apache.phoenix.end2end.UpsertSelectIT
org.apache.phoenix.end2end.UpsertSelectIT.testDisallowNegativeValuesForRowTsColumn[UpsertSelecttIT_allowServerSideMutations=true]
-- Time elapsed: 33.40 s <<< FAILURE!
java.lang.AssertionError: expected:<0> but was:<-3>
at org.junit.Assert.fail(Assert.java:89)
at org.junit.Assert.failNotEquals(Assert.java:835)
at org.junit.Assert.assertEquals(Assert.java:647)
at org.junit.Assert.assertEquals(Assert.java:633)
at
org.apache.phoenix.end2end.UpsertSelectIT.waitForOpenConnectionsToSettle(UpsertSelectIT.java:129)
at
org.apache.phoenix.end2end.UpsertSelectIT.assertNoConnLeak(UpsertSelectIT.java:114)
{noformat}
The CI cache has 7 such failures from 2026-11-20 to 2026-11-23. The failing
methods are {{{}testUpsertSelectWithLimit{}}},
{{{}testUpsertSelectWithIndex{}}},
{{{}testUpsertSelectRowKeyMutationOnSplitedTable{}}},
{{testUpsertSelectWithNoIndexWithSalt}} (2 runs), {{testUpsertSelectForAgg}}
and {{{}testDisallowNegativeValuesForRowTsColumn{}}}.
The class setup does not take effect, because the class shares a mini cluster
that another class started.
* {{UpsertSelectIT}} has {{{}@Category(ParallelStatsDisabledTest.class){}}}.
That failsafe execution uses {{{}reuseForks=true{}}}.
{{BaseTest.checkClusterInitialized}} starts a cluster only once per fork, so
the first class in the fork sets the server properties.
* The static {{doSetup}} of {{UpsertSelectIT}} sets
{{PHOENIX_INDEX_CDC_CONSUMER_ENABLED=false}} and
{{{}TASK_HANDLING_INITIAL_DELAY_MS=Long.MAX_VALUE{}}}. On a shared cluster,
these properties have no effect.
* With the consumer on, {{IndexRegionObserver}} starts one
{{IndexCDCConsumer}} for each data region. The consumer opens a server
connection when it starts. After its startup delay (10 s by default),
{{hasEventuallyConsistentIndexes}} opens another one with
{{{}QueryUtil.getConnectionOnServer{}}}.
* Server connections count in {{{}GLOBAL_OPEN_PHOENIX_CONNECTIONS{}}}. The
{{@Before}} method resets all global client metrics. When a server connection
opens before the reset and closes after it, the counter goes below zero.
* {{waitForOpenConnectionsToSettle}} loops while the counter is not 0, and
then asserts 0. It cannot recover from a negative value.
The cached CI log of run 45131582694 has many {{IndexCDCConsumer}} threads.
Each thread makes two {{isServerSide = true}} connections. This shows that the
class property was ignored. The same log has 24 server connections on one pool
thread from {{{}SelfHealingTask{}}}, at its 10 s interval. That is a smaller
part of the same drift.
was:
{{UpsertSelectIT}} fails sometimes in its {{@After}} connection leak check. The
failing method is different from run to run.
{noformat}
Tests run: 54, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 256.9 s <<<
FAILURE! -- in org.apache.phoenix.end2end.UpsertSelectIT
org.apache.phoenix.end2end.UpsertSelectIT.testDisallowNegativeValuesForRowTsColumn[UpsertSelecttIT_allowServerSideMutations=true]
-- Time elapsed: 33.40 s <<< FAILURE!
java.lang.AssertionError: expected:<0> but was:<-3>
at org.junit.Assert.fail(Assert.java:89)
at org.junit.Assert.failNotEquals(Assert.java:835)
at org.junit.Assert.assertEquals(Assert.java:647)
at org.junit.Assert.assertEquals(Assert.java:633)
at
org.apache.phoenix.end2end.UpsertSelectIT.waitForOpenConnectionsToSettle(UpsertSelectIT.java:129)
at
org.apache.phoenix.end2end.UpsertSelectIT.assertNoConnLeak(UpsertSelectIT.java:114)
{noformat}
The CI cache has 7 such failures from 2026-11-20 to 2026-11-23. Six show {{-1}}
and one shows {{{}-3{}}}. They are on PRs for master and on
{{{}backport-2680-5.3{}}}. The failing methods are
{{{}testUpsertSelectWithLimit{}}}, {{{}testUpsertSelectWithIndex{}}},
{{{}testUpsertSelectRowKeyMutationOnSplitedTable{}}},
{{testUpsertSelectWithNoIndexWithSalt}} (2 runs), {{testUpsertSelectForAgg}}
and {{{}testDisallowNegativeValuesForRowTsColumn{}}}. Local gate run 10 on
2026-11-24 also failed in {{assertNoConnLeak}} with {{{}expected:<0> but
was:<-1>{}}}.
The class setup does not take effect, because the class shares a mini cluster
that another class started.
* {{UpsertSelectIT}} has {{{}@Category(ParallelStatsDisabledTest.class){}}}.
That failsafe execution uses {{{}reuseForks=true{}}}.
{{BaseTest.checkClusterInitialized}} starts a cluster only once per fork, so
the first class in the fork sets the server properties.
* The static {{doSetup}} of {{UpsertSelectIT}} sets
{{PHOENIX_INDEX_CDC_CONSUMER_ENABLED=false}} and
{{{}TASK_HANDLING_INITIAL_DELAY_MS=Long.MAX_VALUE{}}}. On a shared cluster,
these properties have no effect.
* With the consumer on, {{IndexRegionObserver}} starts one
{{IndexCDCConsumer}} for each data region. The consumer opens a server
connection when it starts. After its startup delay (10 s by default),
{{hasEventuallyConsistentIndexes}} opens another one with
{{{}QueryUtil.getConnectionOnServer{}}}.
* Server connections count in {{{}GLOBAL_OPEN_PHOENIX_CONNECTIONS{}}}. The
{{@Before}} method resets all global client metrics. When a server connection
opens before the reset and closes after it, the counter goes below zero.
* {{waitForOpenConnectionsToSettle}} loops while the counter is not 0, and
then asserts 0. It cannot recover from a negative value.
The cached CI log of run 45131582694 has many {{IndexCDCConsumer}} threads.
Each thread makes two {{isServerSide = true}} connections. This shows that the
class property was ignored. The same log has 24 server connections on one pool
thread from {{{}SelfHealingTask{}}}, at its 10 s interval. That is a smaller
part of the same drift.
> UpsertSelectIT counts server connections of the shared cluster
> --------------------------------------------------------------
>
> Key: PHOENIX-8115
> URL: https://issues.apache.org/jira/browse/PHOENIX-8115
> Project: Phoenix
> Issue Type: Test
> Components: test
> Affects Versions: 5.3.2
> Reporter: Andrew Kyle Purtell
> Assignee: Andrew Kyle Purtell
> Priority: Minor
> Fix For: 5.4.0, 5.3.3
>
>
> {{UpsertSelectIT}} fails sometimes in its {{@After}} connection leak check.
> The failing method is different from run to run.
> {noformat}
> Tests run: 54, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 256.9 s <<<
> FAILURE! -- in org.apache.phoenix.end2end.UpsertSelectIT
> org.apache.phoenix.end2end.UpsertSelectIT.testDisallowNegativeValuesForRowTsColumn[UpsertSelecttIT_allowServerSideMutations=true]
> -- Time elapsed: 33.40 s <<< FAILURE!
> java.lang.AssertionError: expected:<0> but was:<-3>
> at org.junit.Assert.fail(Assert.java:89)
> at org.junit.Assert.failNotEquals(Assert.java:835)
> at org.junit.Assert.assertEquals(Assert.java:647)
> at org.junit.Assert.assertEquals(Assert.java:633)
> at
> org.apache.phoenix.end2end.UpsertSelectIT.waitForOpenConnectionsToSettle(UpsertSelectIT.java:129)
> at
> org.apache.phoenix.end2end.UpsertSelectIT.assertNoConnLeak(UpsertSelectIT.java:114)
> {noformat}
>
> The CI cache has 7 such failures from 2026-11-20 to 2026-11-23. The failing
> methods are {{{}testUpsertSelectWithLimit{}}},
> {{{}testUpsertSelectWithIndex{}}},
> {{{}testUpsertSelectRowKeyMutationOnSplitedTable{}}},
> {{testUpsertSelectWithNoIndexWithSalt}} (2 runs), {{testUpsertSelectForAgg}}
> and {{{}testDisallowNegativeValuesForRowTsColumn{}}}.
> The class setup does not take effect, because the class shares a mini cluster
> that another class started.
> * {{UpsertSelectIT}} has {{{}@Category(ParallelStatsDisabledTest.class){}}}.
> That failsafe execution uses {{{}reuseForks=true{}}}.
> {{BaseTest.checkClusterInitialized}} starts a cluster only once per fork, so
> the first class in the fork sets the server properties.
> * The static {{doSetup}} of {{UpsertSelectIT}} sets
> {{PHOENIX_INDEX_CDC_CONSUMER_ENABLED=false}} and
> {{{}TASK_HANDLING_INITIAL_DELAY_MS=Long.MAX_VALUE{}}}. On a shared cluster,
> these properties have no effect.
> * With the consumer on, {{IndexRegionObserver}} starts one
> {{IndexCDCConsumer}} for each data region. The consumer opens a server
> connection when it starts. After its startup delay (10 s by default),
> {{hasEventuallyConsistentIndexes}} opens another one with
> {{{}QueryUtil.getConnectionOnServer{}}}.
> * Server connections count in {{{}GLOBAL_OPEN_PHOENIX_CONNECTIONS{}}}. The
> {{@Before}} method resets all global client metrics. When a server connection
> opens before the reset and closes after it, the counter goes below zero.
> * {{waitForOpenConnectionsToSettle}} loops while the counter is not 0, and
> then asserts 0. It cannot recover from a negative value.
> The cached CI log of run 45131582694 has many {{IndexCDCConsumer}} threads.
> Each thread makes two {{isServerSide = true}} connections. This shows that
> the class property was ignored. The same log has 24 server connections on one
> pool thread from {{{}SelfHealingTask{}}}, at its 10 s interval. That is a
> smaller part of the same drift.
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)