github-actions[bot] commented on code in PR #70216:
URL: https://github.com/apache/doris/pull/70216#discussion_r4476691157
##########
fe/be-java-extensions/fluss-scanner/src/main/java/org/apache/doris/fluss/FlussJniScanner.java:
##########
@@ -241,6 +247,44 @@ 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) throws Exception {
+ TablePath tablePath = TablePath.of(required(DB_NAME),
required(TABLE_NAME));
+ long ttlNanos =
TimeUnit.SECONDS.toNanos(Long.parseLong(params.getOrDefault(
+ FlussTableInfoCache.TTL_PROPERTY,
String.valueOf(FlussTableInfoCache.DEFAULT_TTL_SEC))));
+ if (ttlNanos <= 0) {
+ // Cache policy changes reuse, never which table may consume the
planned bucket/offset range.
+ return validatePlannedIdentity(connection.getTable(tablePath));
+ }
+ Supplier<TableInfo> load = () ->
connection.getAdmin().getTableInfo(tablePath).join();
Review Comment:
[P1] Keep old-FE Fluss scans out of the process-wide table-info cache
When an older FE omits `fluss.table_id` and `fluss.schema_id`, `openTable`
still takes the default-positive-TTL `FlussTableInfoCache.INSTANCE.get` path,
and `matchesPlannedIdentity` has nothing to validate. If a table is altered or
dropped/recreated between two scans, the second range can reuse the first
scan's `TableInfo` and construct its bucket/projection with the wrong
table/schema identity while reading the new bucket/offset range. Bypass this
cross-scan cache (or make it scan-scoped) whenever either planned identity
field is absent, and add a rolling-upgrade test for the missing-field payload.
--
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]