Skip to content

[Bug] Query service leaves KvQueryServer running after the job stops, so lookup joins silently miss #9286

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. CALL sys.query_service('db.tbl', 1) on a fixed-bucket primary key table.
  2. Run a lookup join against that table so the client caches the service address.
  3. Cancel the query service job, then keep looking up the same keys.

QueryExecutorOperator.initializeState() keeps the KvQueryServer in a local variable (line 89), so close() (line 128) closes only query and ioManager and never shuts the server down.

What doesn't meet your expectations?
Expected: the client cannot reach the stopped service and re-resolves its address.

Actual: the leaked server keeps listening and answers from the already closed LocalTableQuery, whose lookup() returns null without throwing; KvServerHandler wraps that null in a normal KvResponse. KvQueryClient forces an address refresh only on UnknownPartitionBucketException or ConnectException, so the lookup join misses every key with no error.

Anything else?
RemoteLookupJoinITCase.ServiceProxy.close() shows the intended order: server.shutdown() then query.close().

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