github-actions[bot] commented on code in PR #70697:
URL: https://github.com/apache/doris/pull/70697#discussion_r4676258336


##########
fe/fe-core/src/main/java/org/apache/doris/datasource/split/SplitSource.java:
##########
@@ -166,7 +167,8 @@ public synchronized List<TScanRangeLocations> 
getNextBatch(int maxBatchSize) thr
         }
         // Lazy splits leave FE after initial dispatch; apply the same checks 
before each RPC response.
         try {
-            FileScanEncryptionGuard.checkBatch(scanRanges);
+            // Keys leave FE only while the target reader and both private 
transports remain available.
+            FileScanEncryptionGuard.checkBatch(scanRanges, () -> 
NativeFileEncryptionSupport.supported(backend));

Review Comment:
   [P1] Revalidate the backend registration before returning encrypted lazy 
splits
   
   `SplitSource` keeps the `Backend` object from planning and now gates each 
`fetchSplitBatch` only with `NativeFileEncryptionSupport.supported(backend)`. 
That helper checks the object's cached lease, but 
`SystemInfoService.dropBackend` only removes the backend from the registry; it 
does not clear the old object's lease or alive flag. If the BE is dropped or 
replaced while this source is still reachable, its next request can pass this 
check and receive PME ranges/file keys even though the bound recipient is no 
longer the registered backend. Reuse the initial dispatch 
`require(backendId,address)`/current-registry check (or carry authenticated 
backend identity in the fetch request) before returning any encrypted batch, 
and stop the source when the registration changes or disappears.



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to