Skip to content

Bump org.xerial.snappy:snappy-java from 1.1.10.8 to 1.1.10.9 (5.3) - #2694

Open
apurtell wants to merge 1 commit into
apache:5.3from
apurtell:backport-2680-5.3
Open

apurtell wants to merge 1 commit into
apache:5.3from
apurtell:backport-2680-5.3

Conversation

@apurtell

Copy link
Copy Markdown
Contributor

Backport of #2680 to 5.3. Cherry-picked with -x from the master commit; it applies cleanly.

Posted by Claude Code on behalf of Andrew Purtell.

🤖 Generated with Claude Code

…2680)

Bumps [org.xerial.snappy:snappy-java](https://github.com/xerial/snappy-java) from 1.1.10.8 to 1.1.10.9.
- [Release notes](https://github.com/xerial/snappy-java/releases)
- [Commits](xerial/snappy-java@v1.1.10.8...v1.1.10.9)

---
updated-dependencies:
- dependency-name: org.xerial.snappy:snappy-java
  dependency-version: 1.1.10.9
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
(cherry picked from commit ebc29a3)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@apurtell

Copy link
Copy Markdown
Contributor Author
UpsertSelectIT.testUpsertSelectForAgg[allowServerSideMutations=true]  33.34 s  FAILURE
java.lang.AssertionError: expected:<0> but was:<-1>
  at UpsertSelectIT.waitForOpenConnectionsToSettle(UpsertSelectIT.java:128)
  at UpsertSelectIT.assertNoConnLeak(UpsertSelectIT.java:113)

The counter is -1, so this is not a leak. A connection that was already open when the counter was reset closed after the reset.

Mechanism

  1. UpsertSelectIT.doSetup sets TASK_HANDLING_INTERVAL_MS/INITIAL_DELAY_MS = Long.MAX_VALUE and PHOENIX_INDEX_CDC_CONSUMER_ENABLED=false to keep background server threads from touching GLOBAL_OPEN_PHOENIX_CONNECTIONS. These are server-side settings. BaseTest.setUpTestDriver → checkClusterInitialized applies serverProps only when it starts a new mini cluster. In this fork an earlier class had already started the shared cluster, so the overrides were silently dropped. The output log has no minicluster startup, and the RS runs TaskRegionObserver at BaseTest's 10 s interval and starts IndexCDCConsumer-* threads.
  2. TaskRegionObserver.SelfHealingTask opens a server connection on every tick through QueryUtil.getConnectionOnServer and closes it a few ms later. In the same JVM that connection is non-internal, so it increments and decrements GLOBAL_OPEN_PHOENIX_CONNECTIONS.
  3. @Before setup() resets every global metric to 0. If a tick's connection is open at that moment, its close drives the counter to -1. The PHOENIX-7952 poll waits for == 0, so it cannot recover. Its only way out is a 100 ms poll that happens to land inside the next tick's few-ms open window.

Timeline from the failsafe output log (RS-local time)

time event
11:44:01.300 task tick opens conn (pool-1858-thread-1)
~11:44:01.31 testParallelUpsertSelect @after reads 0 → testLengthLimitedVarchar @before resets to 0 while the tick conn is open → close → -1
11:44:01–:21 testLengthLimitedVarchar (a trivial test) sits in its @after poll at -1. The :11.348 tick is missed.
11:44:21.353 tick opens conn → counter 0 → poll catches it and @after passes. Elapsed 20.033 s = :21.35 − :01.31
~11:44:21.36 testUpsertSelectForAgg @before resets to 0 while the :21.353 conn is open → close → -1
:31, :41, :51 ticks missed by the poll
~11:44:54.7 30 s settle timeout → expected:<0> but was:<-1>. Elapsed 33.34 s ≈ 3 s body + 30 s poll

IndexCDCConsumer threads also open server connections on the same counter: one at region open and another after a 10 s startup delay. That is a second source of the same race. The task tick alone accounts for this failure.

Why it is not this PR: the diff only bumps snappy-java 1.1.10.8 → 1.1.10.9. Nothing in the failure path uses compression.

Related: #2446 (PHOENIX-7829) disables the SelfHealingTask schedule for all mini-cluster ITs in BaseTest, which removes the source that caused this failure. The IndexCDCConsumer source and the reset race in the leak check are still open.

Posted by Claude Code on behalf of Andrew Purtell.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant