thswlsqls opened a new pull request, #9287:
URL: https://github.com/apache/paimon/pull/9287

   
   ### Purpose
   
   fix #9286
   
   `QueryExecutorOperator.initializeState()` holds the `KvQueryServer` in a 
local variable, so `close()` cannot stop it. The leaked server keeps answering 
from the already closed `LocalTableQuery`: `lookup()` returns null without 
throwing, and `KvServerHandler` wraps that null in a normal `KvResponse`. 
`KvQueryClient` re-resolves the address only on 
`UnknownPartitionBucketException` or `ConnectException`, so a lookup join on 
the cached address silently misses every key.
   
   Keep the server in a `transient` field, assigned before `start()`, and shut 
it down in `close()` before `query.close()`, as 
`RemoteLookupJoinITCase.ServiceProxy.close()` does. Requests to the stopped 
server then fail with `ConnectException` and the client re-resolves.
   
   ### Tests
   
   - Added `QueryExecutorOperatorTest#testQueryServerIsShutDownOnClose`: the 
published host/port accepts a socket while the operator is open, and refuses it 
after `harness.close()`. It fails without the fix.
   - `mvn -pl paimon-flink/paimon-flink-common -Pflink1 clean install`: 2302 
tests, 0 failures, 0 errors, including `RemoteLookupJoinITCase`.
   - `-Pflink2` not run locally.
   
   
   


-- 
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