github-actions[bot] commented on code in PR #68226:
URL: https://github.com/apache/doris/pull/68226#discussion_r4216859791


##########
fe/fe-core/src/main/java/org/apache/doris/alter/SchemaChangeHandler.java:
##########
@@ -3086,7 +3086,7 @@ public void updatePartitionProperties(Database db, String 
tableName, String part
                         "Partition[" + partitionName + "] does not exist in 
table[" + olapTable.getName() + "]");
             }
 
-            for (MaterializedIndex index : 
partition.getMaterializedIndices(IndexExtState.VISIBLE)) {
+            for (MaterializedIndex index : 
partition.getMaterializedIndices(IndexExtState.VISIBLE, true)) {

Review Comment:
   [P1] Fence ROW-binlog deletion until the shorter TTL is durably published in 
FE. This newly includes the hidden binlog tablets in 
`updatePartitionProperties`, which runs before `Env.updateBinlogConfig` 
journals the table setting. If a later partition's BE task or cloud Meta 
Service batch fails, earlier tablets retain the shorter TTL while FE still 
advertises the old one; the new scanner may compact away rows still inside FE's 
retention window, and the local/cloud commit checks only see the 
already-updated tablet config. Publish the retention change before cleanup can 
use it, or roll back/fence partial updates on failure.



##########
fe/fe-core/src/main/java/org/apache/doris/catalog/Database.java:
##########
@@ -1016,6 +1016,13 @@ public void replayUpdateDbProperties(Map<String, String> 
properties) {
     public boolean updateDbProperties(Map<String, String> properties) throws 
DdlException {
         if (PropertyAnalyzer.hasBinlogConfig(properties)) {
             BinlogConfig oldBinlogConfig = getBinlogConfig();
+            BinlogConfig effectiveConfig = new BinlogConfig(oldBinlogConfig);
+            effectiveConfig.mergeFromProperties(properties);
+            if (effectiveConfig.isEnableForStreaming()
+                    && 
properties.containsKey(PropertyAnalyzer.PROPERTIES_BINLOG_TTL_SECONDS)

Review Comment:
   [P2] Validate the merged ROW configuration when enabling the format, even if 
this ALTER omits `binlog.ttl_seconds`. A database can first store 
`binlog.format=ROW, binlog.ttl_seconds=-1` while binlog is disabled, then 
accept `ALTER DATABASE ... SET ("binlog.enable"="true")` because this guard 
skips the check. The persisted enabled ROW/-1 config makes ordinary CREATE 
TABLE fail while inheriting its TTL. Reject the second ALTER or normalize the 
effective TTL before persisting it.



##########
fe/fe-core/src/main/java/org/apache/doris/nereids/rules/analysis/BindRelation.java:
##########
@@ -253,12 +253,15 @@ private LogicalPlan makeOlapScan(TableIf table, 
UnboundRelation unboundRelation,
         List<Long> tabletIds = unboundRelation.getTabletIds();
         StreamScanType changeScanType = checkChangeScanCondition((OlapTable) 
table, unboundRelation.getScanParams());
         if (changeScanType != null) {
+            OlapTable originTable = (OlapTable) table;
+            Pair<Long, Long> timestampRange = 
parseTimestampRange(unboundRelation.getScanParams());
+            timestampRange = applyRowBinlogTtl(timestampRange, originTable, 
changeScanType,

Review Comment:
   [P1] Enforce the ROW TTL window for MoW time-travel scans too. This clamp 
covers direct `@incr`, but `FOR VERSION/TIME AS OF` takes the later 
`buildMowTimeTravelUnion()` path and constructs its own binlog `MIN_DELTA` scan 
from `targetTso` without a cutoff check. If A at T1 is updated to B at T2 and 
the before-image rowset for T2 has expired, a fresh snapshot at T1 filters B 
from the base branch and finds no A in the binlog branch, silently returning no 
row. Obtain the statement reference and reject snapshots older than the cutoff, 
or preserve the needed history.



##########
fe/fe-core/src/main/java/org/apache/doris/binlog/RowBinlogTtlDiscovery.java:
##########
@@ -0,0 +1,165 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
+
+package org.apache.doris.binlog;
+
+import org.apache.doris.catalog.Database;
+import org.apache.doris.catalog.Env;
+import org.apache.doris.catalog.MaterializedIndex;
+import org.apache.doris.catalog.OlapTable;
+import org.apache.doris.catalog.Partition;
+import org.apache.doris.catalog.Table;
+import org.apache.doris.catalog.Tablet;
+import org.apache.doris.cloud.catalog.CloudReplica;
+import org.apache.doris.cloud.qe.ComputeGroupException;
+import org.apache.doris.cloud.system.CloudSystemInfoService;
+import org.apache.doris.common.Config;
+import org.apache.doris.proto.InternalService;
+import org.apache.doris.rpc.BackendServiceProxy;
+import org.apache.doris.rpc.RpcException;
+import org.apache.doris.system.Backend;
+import org.apache.doris.thrift.TStatusCode;
+
+import com.google.common.util.concurrent.FutureCallback;
+import com.google.common.util.concurrent.Futures;
+import com.google.common.util.concurrent.MoreExecutors;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.concurrent.TimeUnit;
+
+/** Bounded catalog discovery for tablets absent from a BE's metadata cache. */
+public final class RowBinlogTtlDiscovery {
+    private static final Logger LOG = 
LogManager.getLogger(RowBinlogTtlDiscovery.class);
+    private Iterator<Database> databases = Collections.emptyIterator();
+    private Iterator<Table> tables = Collections.emptyIterator();
+    private Iterator<Partition> partitions = Collections.emptyIterator();
+    private Iterator<Tablet> tablets = Collections.emptyIterator();
+    private Iterator<MaterializedIndex> indexes = Collections.emptyIterator();
+    private OlapTable currentTable;
+
+    public void discover() {
+        if (!Config.isCloudMode() || !Config.enable_feature_binlog) {
+            return;
+        }
+        try {
+            CloudSystemInfoService info = (CloudSystemInfoService) 
Env.getCurrentSystemInfo();
+            Map<Long, List<Long>> targets = new HashMap<>();
+            long deadline = System.nanoTime() + 
TimeUnit.MILLISECONDS.toNanos(50);
+            if (!databases.hasNext() && !tables.hasNext() && 
!partitions.hasNext()
+                    && !indexes.hasNext() && !tablets.hasNext()) {
+                databases = 
Env.getCurrentInternalCatalog().getDbs().iterator();
+            }
+            for (int n = 0; n < 64 && System.nanoTime() < deadline; n++) {
+                Tablet tablet = nextTablet(deadline);
+                if (tablet == null) {
+                    break;
+                }
+                CloudReplica replica = (CloudReplica) 
tablet.getReplicas().get(0);

Review Comment:
   [P2] Increase discovery throughput for uncached cloud tablets. This loop 
visits at most 64 tablets, and `HeartbeatMgr` calls it at most once per 15 
seconds; after a BE restart, 100,000 uncached ROW binlog tablets need at least 
6.5 hours for one pass even if every RPC succeeds. Until visited, they are 
absent from the BE scanner registry, so short TTLs cannot reclaim their data 
promptly. Keep the per-call work bounded, but schedule batches at a rate that 
scales with catalog size.



##########
be/src/storage/tablet/tablet_meta.cpp:
##########
@@ -857,6 +858,9 @@ void TabletMeta::init_from_pb(const TabletMetaPB& 
tablet_meta_pb) {
     // init _schema
     TabletSchemaSPtr schema = std::make_shared<TabletSchema>();
     TabletSchemaPB schema_pb = tablet_meta_pb.schema();
+    _disable_auto_compaction.store(schema_pb.disable_auto_compaction());
+    // The switch belongs to this tablet, not to the immutable schema cache 
entry.
+    schema_pb.clear_disable_auto_compaction();

Review Comment:
   [P2] Update the high-version-count compaction gate to read 
`tablet_meta()->disable_auto_compaction()`. Clearing the flag from the cached 
schema makes `RowsetBuilder::check_tablet_version_count()` see `false` even 
when this tablet has `disable_auto_compaction=true`; once its version count 
passes `max_version_config - 100`, a load calls `submit_compaction_task(..., 
true, true, 2)` and starts compaction despite the table setting.



##########
fe/fe-core/src/main/java/org/apache/doris/tso/MasterTsoProvider.java:
##########
@@ -0,0 +1,67 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
+
+package org.apache.doris.tso;
+
+import org.apache.doris.catalog.Env;
+import org.apache.doris.common.ClientPool;
+import org.apache.doris.nereids.exceptions.AnalysisException;
+import org.apache.doris.qe.ConnectContext;
+import org.apache.doris.thrift.FrontendService;
+import org.apache.doris.thrift.TGetCurrentTsoResult;
+import org.apache.doris.thrift.TNetworkAddress;
+import org.apache.doris.thrift.TStatusCode;
+
+public final class MasterTsoProvider {
+    private MasterTsoProvider() {
+    }
+
+    // TSOService validates calibration and range; a successful allocation is 
positive.
+    public static long getCurrentTso(ConnectContext context) {
+        Env env = context.getEnv();
+        if (env.isMaster()) {
+            return env.getTSOService().getTSO();
+        }
+
+        TNetworkAddress address = new TNetworkAddress(env.getMasterHost(), 
env.getMasterRpcPort());
+        FrontendService.Client client = null;
+        boolean reusable = false;
+        try {
+            int timeoutMs = context.getExecTimeoutS() * 1000;
+            client = ClientPool.frontendPool.borrowObject(address, timeoutMs);
+            TGetCurrentTsoResult result = client.getCurrentTso();

Review Comment:
   [P2] Preserve ROW-binlog reads while a follower is upgraded before its 
master. `getCurrentTso()` is a new FrontendService RPC in this PR, but an 
upgraded follower calls it unconditionally when planning `@incr` on an existing 
ROW table with its default positive TTL. An older master has no such method, so 
Thrift returns an unknown-method error and this path raises 
`AnalysisException`; readable followers normally execute those queries locally. 
Use a compatible reference path or gate/forward these plans until the master 
supports the RPC.



##########
fe/fe-core/src/main/java/org/apache/doris/alter/SchemaChangeHandler.java:
##########
@@ -3970,6 +3970,9 @@ public boolean updateBinlogConfig(Database db, OlapTable 
olapTable, List<AlterOp
                     if (!mergePropertiesStatus.first) {
                         throw new 
AnalysisException(mergePropertiesStatus.second);
                     }
+                    if 
(properties.containsKey(PropertyAnalyzer.PROPERTIES_BINLOG_TTL_SECONDS)) {

Review Comment:
   [P2] Invalidate follower SQL cache entries when replay activates ROW TTL. A 
follower can cache an `@incr` query for an existing ROW table whose TTL is 0; 
after the master changes TTL to a positive value, 
`Env.replayModifyTableProperty(OP_UPDATE_BINLOG_CONFIG)` updates that 
follower's table without invalidating its local cache. The master invalidates 
its own cache in `Alter`, but the follower probes its old entry before 
`CollectRelation` can mark the scan unsupported, and cache validation compares 
only visible data versions. The follower can keep serving rows past the new TTL 
until cache eviction; invalidate on replay or reject cached entries when 
current ROW TTL is enabled.



##########
fe/fe-core/src/main/java/org/apache/doris/binlog/RowBinlogTtlDiscovery.java:
##########
@@ -0,0 +1,165 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
+
+package org.apache.doris.binlog;
+
+import org.apache.doris.catalog.Database;
+import org.apache.doris.catalog.Env;
+import org.apache.doris.catalog.MaterializedIndex;
+import org.apache.doris.catalog.OlapTable;
+import org.apache.doris.catalog.Partition;
+import org.apache.doris.catalog.Table;
+import org.apache.doris.catalog.Tablet;
+import org.apache.doris.cloud.catalog.CloudReplica;
+import org.apache.doris.cloud.qe.ComputeGroupException;
+import org.apache.doris.cloud.system.CloudSystemInfoService;
+import org.apache.doris.common.Config;
+import org.apache.doris.proto.InternalService;
+import org.apache.doris.rpc.BackendServiceProxy;
+import org.apache.doris.rpc.RpcException;
+import org.apache.doris.system.Backend;
+import org.apache.doris.thrift.TStatusCode;
+
+import com.google.common.util.concurrent.FutureCallback;
+import com.google.common.util.concurrent.Futures;
+import com.google.common.util.concurrent.MoreExecutors;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.concurrent.TimeUnit;
+
+/** Bounded catalog discovery for tablets absent from a BE's metadata cache. */
+public final class RowBinlogTtlDiscovery {
+    private static final Logger LOG = 
LogManager.getLogger(RowBinlogTtlDiscovery.class);
+    private Iterator<Database> databases = Collections.emptyIterator();
+    private Iterator<Table> tables = Collections.emptyIterator();
+    private Iterator<Partition> partitions = Collections.emptyIterator();
+    private Iterator<Tablet> tablets = Collections.emptyIterator();
+    private Iterator<MaterializedIndex> indexes = Collections.emptyIterator();
+    private OlapTable currentTable;
+
+    public void discover() {
+        if (!Config.isCloudMode() || !Config.enable_feature_binlog) {
+            return;
+        }
+        try {
+            CloudSystemInfoService info = (CloudSystemInfoService) 
Env.getCurrentSystemInfo();
+            Map<Long, List<Long>> targets = new HashMap<>();
+            long deadline = System.nanoTime() + 
TimeUnit.MILLISECONDS.toNanos(50);
+            if (!databases.hasNext() && !tables.hasNext() && 
!partitions.hasNext()
+                    && !indexes.hasNext() && !tablets.hasNext()) {
+                databases = 
Env.getCurrentInternalCatalog().getDbs().iterator();
+            }
+            for (int n = 0; n < 64 && System.nanoTime() < deadline; n++) {
+                Tablet tablet = nextTablet(deadline);
+                if (tablet == null) {
+                    break;
+                }
+                CloudReplica replica = (CloudReplica) 
tablet.getReplicas().get(0);
+                // One existing replica owner per compute group. BE read/write 
separation
+                // decides which group may compact; Meta Service arbitrates 
competing jobs.
+                for (String clusterId : info.getCloudClusterIds()) {
+                    long backendId;
+                    try {
+                        backendId = 
replica.getBackendIdWithClusterId(clusterId);
+                    } catch (ComputeGroupException e) {
+                        LOG.debug("ROW binlog TTL discovery skipped, compute 
group={}, tablet={}",
+                                clusterId, tablet.getId(), e);
+                        continue;
+                    }
+                    Backend backend = info.getBackend(backendId);
+                    if (backend != null && backend.isAlive()) {
+                        targets.computeIfAbsent(backendId, ignored -> new 
ArrayList<>()).add(tablet.getId());
+                    }
+                }
+            }
+            for (Map.Entry<Long, List<Long>> target : targets.entrySet()) {
+                Backend backend = info.getBackend(target.getKey());
+                if (backend == null || !backend.isAlive()) {
+                    continue;
+                }
+                InternalService.PSyncTabletMetaRequest request = 
InternalService.PSyncTabletMetaRequest.newBuilder()
+                        
.addAllTabletIds(target.getValue()).setDiscoverRowBinlogTtl(true).build();
+                
Futures.addCallback(BackendServiceProxy.getInstance().syncTabletMeta(backend.getBrpcAddress(),
 request),

Review Comment:
   [P2] Keep a synchronous backend dispatch failure local to that backend. 
`syncTabletMeta()` can throw `RpcException` before returning its future; the 
catch outside this loop then skips every later target. If one compute group's 
BE is persistently unreachable and visited first, healthy groups never receive 
TTL discovery. The existing thread fixed exceptions during compute-group target 
collection; this is the later RPC dispatch path. Catch and log around each 
backend call, then continue.



##########
be/src/storage/row_binlog_ttl_scanner.cpp:
##########
@@ -0,0 +1,178 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
+
+#include <bvar/bvar.h>
+
+#include "cloud/cloud_cluster_info.h"
+#include "cloud/cloud_storage_engine.h"
+#include "cloud/cloud_tablet.h"
+#include "cloud/config.h"
+#include "common/config.h"
+#include "runtime/cluster_info.h"
+#include "runtime/exec_env.h"
+#include "runtime/thread_context.h"
+#include "storage/storage_engine.h"
+#include "storage/tablet/tablet.h"
+#include "util/defer_op.h"
+#include "util/thread.h"
+#include "util/threadpool.h"
+#include "util/time.h"
+
+namespace doris {
+namespace {
+bvar::Adder<int64_t> ttl_discovered("row_binlog_ttl_discovered");
+bvar::Adder<int64_t> ttl_submitted("row_binlog_ttl_submitted");
+bvar::Adder<int64_t> ttl_failed("row_binlog_ttl_failed");
+constexpr int kScanBatchSize = 64;
+
+Status prepare_row_binlog_ttl(BaseStorageEngine& engine, int64_t tablet_id, 
bool refresh_cloud_meta,
+                              bool is_cloud) {
+    // Cloud catalog discovery and already queued work must also honor runtime 
switches.
+    if (!config::enable_feature_binlog || config::disable_auto_compaction) {
+        return Status::OK();
+    }
+    auto tablet = DORIS_TRY(engine.get_tablet(tablet_id));
+    if (is_cloud && refresh_cloud_meta) {
+        auto cloud_tablet = std::static_pointer_cast<CloudTablet>(tablet);
+        RETURN_IF_ERROR(cloud_tablet->sync_meta());
+        RETURN_IF_ERROR(cloud_tablet->sync_rowsets());
+    }
+    if (tablet->tablet_state() != TABLET_RUNNING || 
!tablet->scan_expired_row_binlog_rowsets()) {
+        return Status::OK();
+    }
+    ttl_discovered << 1;
+    const auto last_failure =
+            is_cloud
+                    ? std::static_pointer_cast<CloudTablet>(tablet)
+                              ->last_cumu_compaction_failure_time()
+                    : 
std::static_pointer_cast<Tablet>(tablet)->last_cumu_compaction_failure_time();
+    if (UnixMillis() - last_failure < 
config::min_compaction_failure_interval_ms) {
+        return Status::OK();
+    }
+    if (is_cloud) {
+        auto cloud_tablet = std::static_pointer_cast<CloudTablet>(tablet);
+        auto* cluster = 
static_cast<CloudClusterInfo*>(ExecEnv::GetInstance()->cluster_info());
+        if (cluster->should_skip_compaction(cloud_tablet.get()) || 
cluster->is_in_standby()) {
+            return Status::OK();
+        }
+        RETURN_IF_ERROR(engine.to_cloud().submit_compaction_task(
+                cloud_tablet, CompactionType::CUMU_BINLOG_COMPACTION));
+    } else {
+        RETURN_IF_ERROR(engine.to_local().submit_compaction_task(
+                std::static_pointer_cast<Tablet>(tablet), 
CompactionType::CUMU_BINLOG_COMPACTION,
+                false));
+    }
+    ttl_submitted << 1;
+    return Status::OK();
+}
+} // namespace
+
+void BaseStorageEngine::register_row_binlog_tablet(const BaseTabletSPtr& 
tablet) {
+    if (tablet->is_row_binlog_tablet()) {
+        std::lock_guard lock(_row_binlog_ttl_mutex);
+        _row_binlog_ttl_tablets[tablet->tablet_id()] = tablet;
+    }
+}
+
+Status BaseStorageEngine::submit_row_binlog_ttl(int64_t tablet_id, bool 
refresh_cloud_meta) {
+    if (ExecEnv::GetInstance()->cluster_info()->row_binlog_ttl_reference_tso() 
<= 0) {
+        return Status::Error<ErrorCode::SERVICE_UNAVAILABLE>("No valid ROW 
binlog TTL reference");
+    }
+    std::lock_guard lock(_row_binlog_ttl_mutex);
+    if (!_row_binlog_ttl_prepare_pool || 
_stop_background_threads_latch.count() == 0) {
+        return Status::Error<ErrorCode::SERVICE_UNAVAILABLE>(
+                "ROW binlog TTL scanner is not running");
+    }
+    if (!_row_binlog_ttl_pending.insert(tablet_id).second) {
+        return Status::AlreadyExist("ROW binlog TTL task already queued for 
{}", tablet_id);
+    }
+    auto st = _row_binlog_ttl_prepare_pool->submit_func([this, tablet_id, 
refresh_cloud_meta]() {
+        SCOPED_INIT_THREAD_CONTEXT();
+        Defer clear_pending([this, tablet_id] {
+            std::lock_guard lock(_row_binlog_ttl_mutex);
+            _row_binlog_ttl_pending.erase(tablet_id);
+        });
+        auto result =
+                prepare_row_binlog_ttl(*this, tablet_id, refresh_cloud_meta, 
_type == Type::CLOUD);
+        if (!result.ok()) {
+            ttl_failed << 1;
+            LOG_EVERY_N(WARNING, 100)
+                    << "ROW binlog TTL task failed, tablet=" << tablet_id << 
", status=" << result;
+        }
+    });
+    if (!st.ok()) {
+        _row_binlog_ttl_pending.erase(tablet_id);
+    }
+    return st;
+}
+
+Status BaseStorageEngine::_start_row_binlog_ttl_scanner() {
+    RETURN_IF_ERROR(ThreadPoolBuilder("RowBinlogTtlPrepare")
+                            .set_min_threads(1)
+                            .set_max_threads(1)
+                            .set_max_queue_size(kScanBatchSize)
+                            .build(&_row_binlog_ttl_prepare_pool));
+    return Thread::create(
+            "StorageEngine", "row_binlog_ttl_scanner",
+            [this] {
+                SCOPED_INIT_THREAD_CONTEXT();
+                int64_t cursor = 0;

Review Comment:
   [P2] Prune expired tablet registrations even while TTL execution is 
disabled. `CloudTabletMgr` registers every ROW binlog tablet loaded on a cache 
miss, but eviction only releases the strong cache/map entry; the weak map key 
is erased only below this `continue`. With `enable_feature_binlog=false`, 
global auto compaction disabled, or no reference TSO for a sustained period, 
each distinct evicted cloud tablet leaves a key indefinitely, so BE memory 
grows with catalog churn.



-- 
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]

Reply via email to