Gabriel39 commented on code in PR #70216:
URL: https://github.com/apache/doris/pull/70216#discussion_r4476336570
##########
fe/be-java-extensions/fluss-scanner/src/main/java/org/apache/doris/fluss/FlussJniScanner.java:
##########
@@ -241,6 +247,38 @@ protected void openInternal() throws IOException {
}
}
+ /**
+ * The table, built from the info {@link FlussTableInfoCache} keeps for it
rather than asked of the
+ * cluster by every range. A TTL of zero asks the way every range used to,
metadata refresh included.
+ */
+ private Table openTable(Map<String, String> config) {
+ TablePath tablePath = TablePath.of(required(DB_NAME),
required(TABLE_NAME));
Review Comment:
Fixed in 2579e237d89. The live Connection.getTable() path now goes through
the same planned table/schema identity validation as the cached path, and
rejected handles are closed. The embedded Fluss scanner test covers valid
identities plus stale table and schema IDs with TTLs 0 and -1; it reproduced
the missing rejection before the fix. All 97 scanner tests pass.
##########
fe/fe-connector/fe-connector-fluss/src/main/java/org/apache/doris/connector/fluss/FlussConnectorMetadata.java:
##########
@@ -492,7 +492,9 @@ public List<ConnectorPartitionInfo>
listPartitions(ConnectorSession session,
// name makes every partition of this table unreadable, whether it has
any yet or not.
rejectUnreadablePartitionColumns(flussHandle, partitionKeys);
- List<PartitionInfo> flussPartitions =
adminOps.listPartitionInfos(flussHandle.toTablePath());
+ // From a short-lived cache: the engine lists on every statement,
point lookups included, and
+ // FlussPartitionListCache says why that is worth avoiding and what it
costs.
+ List<PartitionInfo> flussPartitions =
adminOps.listPartitionInfosForPruning(flussHandle.toTablePath());
Review Comment:
Fixed in 2579e237d89. Partition-list reuse now belongs to each statement
metadata/admin scope rather than the catalog connector. A new statement starts
with a fresh pruning list, while repeated access in its own scope can still
reuse that list. The embedded cluster test creates a partition after an earlier
pruning request and verifies that a new metadata scope sees it immediately
without REFRESH or waiting for the TTL. It failed with the shared cache before
the fix; all 298 connector tests pass. The PR description also documents the
narrower scope of fluss.partition.cache.ttl.sec.
--
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]