Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
import org.apache.doris.catalog.TableIf.TableType;
import org.apache.doris.catalog.Tablet;
import org.apache.doris.catalog.TabletMeta;
import org.apache.doris.cloud.catalog.CloudPartition;
import org.apache.doris.cloud.catalog.CloudTablet;
import org.apache.doris.cloud.proto.Cloud.CommitTxnResponse;
import org.apache.doris.cluster.ClusterNamespace;
Expand Down Expand Up @@ -623,6 +624,20 @@ public TListTableStatusResult listTableStatus(TGetTablesParams params) throws TE
table.getName(), PrivPredicate.SHOW)) {
continue;
}
// For the follower node in cloud mode,
// when querying the information_schema table,
// the version needs to be updated.
// Otherwise, the version will always be the old value
// unless there is a query for the table in the follower node.
if (!Env.getCurrentEnv().isMaster() && Config.isCloudMode()
&& table instanceof OlapTable) {
OlapTable olapTable = (OlapTable) table;
List<CloudPartition> partitions = olapTable.getAllPartitions().stream()
.filter(p -> p instanceof CloudPartition)
.map(cloudPartition -> (CloudPartition) cloudPartition)
.collect(Collectors.toList());
CloudPartition.getSnapshotVisibleVersion(partitions);
}
table.readLock();
try {
if (matcher != null && !matcher.match(table.getName())) {
Expand Down