[fix](paimon)fix paimon cache bug (#35309)
Issue Number: close #35024 This bug is because the fe incorrectly sets the update time of paimon catalog, causing the be to be unable to update paimon's schema in time. ```c++ private void initTable() { PaimonTableCacheKey key = new PaimonTableCacheKey(ctlId, dbId, tblId, paimonOptionParams, dbName, tblName); TableExt tableExt = PaimonTableCache.getTable(key); if (tableExt.getCreateTime() < lastUpdateTime) { LOG.warn("invalidate cache table:{}, localTime:{}, remoteTime:{}", key, tableExt.getCreateTime(), lastUpdateTime); PaimonTableCache.invalidateTableCache(key); tableExt = PaimonTableCache.getTable(key); } this.table = tableExt.getTable(); paimonAllFieldNames = PaimonScannerUtils.fieldNames(this.table.rowType()); if (LOG.isDebugEnabled()) { LOG.debug("paimonAllFieldNames:{}", paimonAllFieldNames); } } ```
This commit is contained in:
@ -539,10 +539,6 @@ public interface TableIf {
|
||||
return getType() == TableType.OLAP || getType() == TableType.MATERIALIZED_VIEW;
|
||||
}
|
||||
|
||||
default long getLastUpdateTime() {
|
||||
return -1L;
|
||||
}
|
||||
|
||||
default long getDataSize(boolean singleReplica) {
|
||||
// TODO: Each tableIf should impl it by itself.
|
||||
return 0;
|
||||
|
||||
@ -169,7 +169,7 @@ public class PaimonScanNode extends FileQueryScanNode {
|
||||
fileDesc.setCtlId(source.getCatalog().getId());
|
||||
fileDesc.setDbId(((PaimonExternalTable) source.getTargetTable()).getDbId());
|
||||
fileDesc.setTblId(source.getTargetTable().getId());
|
||||
fileDesc.setLastUpdateTime(source.getTargetTable().getLastUpdateTime());
|
||||
fileDesc.setLastUpdateTime(source.getTargetTable().getUpdateTime());
|
||||
Optional<DeletionFile> optDeletionFile = paimonSplit.getDeletionFile();
|
||||
if (optDeletionFile.isPresent()) {
|
||||
DeletionFile deletionFile = optDeletionFile.get();
|
||||
|
||||
Reference in New Issue
Block a user