Skip to content

[Bug] QueryFileMonitor source is always measured as busy #9290

Description

@thswlsqls

Search before asking

  • I searched in the issues and found nothing similar.

Paimon version
master @ 4af1470

Compute Engine
Flink

Minimal reproduce step

  1. Start the query service on any table: CALL sys.query_service('default.t', 1).
  2. Watch the FileMonitor-<table> source task in the Flink Web UI while no new files are committed.

QueryFileMonitor.Reader.pollNext() (paimon-flink/paimon-flink-common/src/main/java/org/apache/paimon/flink/service/QueryFileMonitor.java, line 97-105) calls Thread.sleep(monitorInterval) on the mailbox thread and then returns InputStatus.MORE_AVAILABLE. It does not override isAvailable(), so AbstractNonCoordinatedSourceReader.isAvailable() keeps returning an already completed future.

The sibling MonitorSource.Reader in the same module was changed in #6396 to await the interval asynchronously, override isAvailable() and return NOTHING_AVAILABLE. QueryFileMonitor was not covered by that change.

What doesn't meet your expectations?
Expected: the source is measured as idle while waiting for the next discovery interval.

Actual: busyTimeMsPerSecond stays at 1000, so the Web UI reports this source as a permanent bottleneck. Checkpoint triggering is also delayed by up to continuous.discovery-interval (default 10s) while the mailbox thread is blocked.

Anything else?
N/A

Are you willing to submit a PR?

  • I'm willing to submit a PR!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions