xuchenhao commented on code in PR #59065:
URL: https://github.com/apache/doris/pull/59065#discussion_r2684446468
##########
fe/fe-core/src/main/java/org/apache/doris/datasource/FileQueryScanNode.java:
##########
@@ -307,11 +309,42 @@ public void createScanRangeLocations() throws
UserException {
int numBackends = backendPolicy.numBackends();
List<String> pathPartitionKeys = getPathPartitionKeys();
+
+ Boolean admissionResultAtTableLevel = true;
+ if (Config.enable_file_cache_admission_control) {
+ TableIf tableIf = getTargetTable();
+ if (tableIf instanceof ExternalTable) {
+ ExternalTable externalTableIf = (ExternalTable) tableIf;
+
+ String userIdentity = ConnectContext.get().getUserIdentity();
+ String catalog = externalTableIf.getCatalog().getName();
+ String database = externalTableIf.getDatabase().getFullName();
+ String table = externalTableIf.getName();
+
+ AtomicReference<String> reason = new AtomicReference<>("");
+
+ long startTime = System.nanoTime();
+
+ admissionResultAtTableLevel =
FileCacheAdmissionManager.getInstance().isAdmittedAtTableLevel(
+ userIdentity, catalog, database, table, reason);
+
+ long endTime = System.nanoTime();
+ double durationMs = (double) (endTime - startTime) / 1_000_000;
+
+ LOG.debug("File cache admission control cost {} ms",
String.format("%.6f", durationMs));
Review Comment:
ok
--
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]