Skip to content

[flink] Avoid having append compact sources always busy - #10913

Open
p-eye wants to merge 1 commit into
apache:masterfrom
p-eye:fix/flink-compact-source-non-blocking
Open

p-eye wants to merge 1 commit into
apache:masterfrom
p-eye:fix/flink-compact-source-non-blocking

Conversation

@p-eye

@p-eye p-eye commented Oct 31, 2026

Copy link
Copy Markdown
Contributor

Purpose

AppendTableCompactSource, CombinedAppendCompactStreamSource and CombinedAwareStreamingSource call Thread.sleep in pollNext when there is nothing to compact. This blocks the mailbox thread, so the coordinator always reports 100% busy and checkpoint barriers wait for the sleep.

Same fix as #9291 (QueryFileMonitor): return NOTHING_AVAILABLE and complete the isAvailable() future from a timer. The timer logic is shared in DelayedAvailability.

Tests

  • DelayedAvailabilityTest
  • AppendTableCompactSourceTest
  • Combined readers are covered by the existing streaming cases in CompactDatabaseActionITCase

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