thswlsqls opened a new issue, #9286:
URL: https://github.com/apache/paimon/issues/9286

   
   **Search before asking**
   - [x] I searched in the [issues](https://github.com/apache/paimon/issues) 
and found nothing similar.
   
   **Paimon version**
   master @ 4af1470c5
   
   **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?**
   - [x] I'm willing to submit a PR!
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to