'capture_consistent_versions error: version already been compacted.

为了更快的定位您的问题,请提供以下信息,谢谢
【详述】查询表(select count(1))报错,version already been compacted.并且必现该问题
【背景】通过跨集群同步工具,从2.3.0同步数据到3.2.11,每天凌晨的时候,会出现tabet版本失败。且观察了2天,每天都会出现
【业务影响】导致部分表无法使用
【是否存算分离】
【StarRocks版本】例如:3.2.11
【集群规模】例如:1fe+4be
【机器信息】CPU虚拟核/内存/网卡,例如:48C/64G/万兆
【联系方式】StarRocks社区群17 - Golden
【附件】

  1. 查询sql报错:
##### 正在检测表 servicecloud.LongTaskExperienceLog
##### 正在检测表 servicecloud.MESOracleBufferHitRateCollected_sr_duplicate
(1064, 'capture_consistent_versions error: version already been compacted. tablet_id: 3321304, version: 233 tablet_max_version:241 backend [id=10004] [host=10.0.43.92]')
##### 正在检测表 servicecloud.MESOracleFileStatusCollected_sr_duplicate
##### 正在检测表 servicecloud.MESOracleLogBufferRateCollected_sr_duplicate
(1064, 'capture_consistent_versions error: version already been compacted. tablet_id: 3896269, version: 238 tablet_max_version:248 backend [id=10004] [host=10.0.43.92]')
  1. 通过https://forum.mirrorship.cn/t/topic/14520
    的帖子调查方法,最终执行:show tablet from servicecloud.MESOracleBufferHitRateCollected_sr_duplicate PARTITION (p20241015); 结果如下:
+----------+-----------+-----------+------------+---------+-------------+-------------------+-----------------------+------------------+----------------------+---------------------+----------+----------+--------+-------------------------+--------------+------------------+--------------+---------------------+---------------------------------------------------+-----------------------------------------------------------------+
| TabletId | ReplicaId | BackendId | SchemaHash | Version | VersionHash | LstSuccessVersion | LstSuccessVersionHash | LstFailedVersion | LstFailedVersionHash | LstFailedTime       | DataSize | RowCount | State  | LstConsistencyCheckTime | CheckVersion | CheckVersionHash | VersionCount | PathHash            | MetaUrl                                           | CompactionStatus                                                |
+----------+-----------+-----------+------------+---------+-------------+-------------------+-----------------------+------------------+----------------------+---------------------+----------+----------+--------+-------------------------+--------------+------------------+--------------+---------------------+---------------------------------------------------+-----------------------------------------------------------------+
| 3321304  | 3321305   | 10004     | 0          | 241     | 0           | 241               | 0                     | -1               | 0                    | NULL                | 7.1KB    | 64       | NORMAL | 2024-10-15 01:09:01     | 105          | 0                | 1            | 2233629211880957783 | http://10.0.43.92:28040/api/meta/header/3321304   | http://10.0.43.92:28040/api/compaction/show?tablet_id=3321304   |
| 3321304  | 3321306   | 10007     | 0          | 241     | 0           | 241               | 0                     | -1               | 0                    | NULL                | 7.1KB    | 64       | NORMAL | 2024-10-15 01:09:01     | 105          | 0                | 1            | 3916065609563790778 | http://10.0.237.118:28040/api/meta/header/3321304 | http://10.0.237.118:28040/api/compaction/show?tablet_id=3321304 |
| 3321304  | 3321307   | 10005     | 0          | 241     | 0           | 241               | 0                     | -1               | 0                    | NULL                | 7.1KB    | 64       | NORMAL | 2024-10-15 01:09:01     | 105          | 0                | 1            | 3303042603235400719 | http://10.0.112.177:28040/api/meta/header/3321304 | http://10.0.112.177:28040/api/compaction/show?tablet_id=3321304 |
| 3321308  | 3321310   | 10004     | 0          | 233     | 0           | 233               | 0                     | -1               | 0                    | NULL                | 8.6KB    | 87       | NORMAL | 2024-10-15 01:09:01     | 105          | 0                | 3            | 2233629211880957783 | http://10.0.43.92:28040/api/meta/header/3321308   | http://10.0.43.92:28040/api/compaction/show?tablet_id=3321308   |
| 3321308  | 3321311   | 10007     | 0          | 233     | 0           | 233               | 0                     | -1               | 0                    | NULL                | 8.6KB    | 87       | NORMAL | 2024-10-15 01:09:01     | 105          | 0                | 3            | 3916065609563790778 | http://10.0.237.118:28040/api/meta/header/3321308 | http://10.0.237.118:28040/api/compaction/show?tablet_id=3321308 |
| 3321308  | 4550590   | 10006     | 0          | 233     | 0           | 233               | 0                     | 241              | 0                    | 2024-10-15 10:36:35 | 8.6KB    | 87       | NORMAL | 2024-10-15 01:09:01     | 105          | 0                | 3            | 859474551383161951  | http://10.0.37.64:28040/api/meta/header/3321308   | http://10.0.37.64:28040/api/compaction/show?tablet_id=3321308   |
| 3321312  | 3321313   | 10005     | 0          | 241     | 0           | 241               | 0                     | -1               | 0                    | NULL                | 7.6KB    | 73       | NORMAL | 2024-10-15 01:09:01     | 105          | 0                | 1            | 3303042603235400719 | http://10.0.112.177:28040/api/meta/header/3321312 | http://10.0.112.177:28040/api/compaction/show?tablet_id=3321312 |
| 3321312  | 3321315   | 10004     | 0          | 241     | 0           | 241               | 0                     | -1               | 0                    | NULL                | 7.6KB    | 73       | NORMAL | 2024-10-15 01:09:01     | 105          | 0                | 1            | 2233629211880957783 | http://10.0.43.92:28040/api/meta/header/3321312   | http://10.0.43.92:28040/api/compaction/show?tablet_id=3321312   |
| 3321312  | 4550585   | 10006     | 0          | 241     | 0           | 241               | 0                     | -1               | 0                    | NULL                | 7.6KB    | 73       | NORMAL | 2024-10-15 01:09:01     | 105          | 0                | 1            | 859474551383161951  | http://10.0.37.64:28040/api/meta/header/3321312   | http://10.0.37.64:28040/api/compaction/show?tablet_id=3321312   |
| 3321316  | 3321317   | 10007     | 0          | 241     | 0           | 241               | 0                     | -1               | 0                    | NULL                | 10KB     | 113      | NORMAL | 2024-10-15 01:09:01     | 105          | 0                | 1            | 3916065609563790778 | http://10.0.237.118:28040/api/meta/header/3321316 | http://10.0.237.118:28040/api/compaction/show?tablet_id=3321316 |
| 3321316  | 3321318   | 10005     | 0          | 241     | 0           | 241               | 0                     | -1               | 0                    | NULL                | 10KB     | 113      | NORMAL | 2024-10-15 01:09:01     | 105          | 0                | 1            | 3303042603235400719 | http://10.0.112.177:28040/api/meta/header/3321316 | http://10.0.112.177:28040/api/compaction/show?tablet_id=3321316 |
| 3321316  | 4550586   | 10006     | 0          | 241     | 0           | 241               | 0                     | -1               | 0                    | NULL                | 10KB     | 113      | NORMAL | 2024-10-15 01:09:01     | 105          | 0                | 1            | 859474551383161951  | http://10.0.37.64:28040/api/meta/header/3321316   | http://10.0.37.64:28040/api/compaction/show?tablet_id=3321316   |
| 3321320  | 3321321   | 10004     | 0          | 241     | 0           | 241               | 0                     | -1               | 0                    | NULL                | 7.4KB    | 67       | NORMAL | 2024-10-15 01:09:01     | 105          | 0                | 1            | 2233629211880957783 | http://10.0.43.92:28040/api/meta/header/3321320   | http://10.0.43.92:28040/api/compaction/show?tablet_id=3321320   |
| 3321320  | 3321322   | 10007     | 0          | 241     | 0           | 241               | 0                     | -1               | 0                    | NULL                | 7.4KB    | 67       | NORMAL | 2024-10-15 01:09:01     | 105          | 0                | 1            | 3916065609563790778 | http://10.0.237.118:28040/api/meta/header/3321320 | http://10.0.237.118:28040/api/compaction/show?tablet_id=3321320 |
| 3321320  | 3321323   | 10005     | 0          | 241     | 0           | 241               | 0                     | -1               | 0                    | NULL                | 7.4KB    | 67       | NORMAL | 2024-10-15 01:09:01     | 105          | 0                | 1            | 3303042603235400719 | http://10.0.112.177:28040/api/meta/header/3321320 | http://10.0.112.177:28040/api/compaction/show?tablet_id=3321320 |
| 3321324  | 3321326   | 10004     | 0          | 233     | 0           | 233               | 0                     | -1               | 0                    | NULL                | 11.2KB   | 85       | NORMAL | 2024-10-15 01:09:01     | 105          | 0                | 3            | 2233629211880957783 | http://10.0.43.92:28040/api/meta/header/3321324   | http://10.0.43.92:28040/api/compaction/show?tablet_id=3321324   |
| 3321324  | 3321327   | 10007     | 0          | 233     | 0           | 233               | 0                     | -1               | 0                    | NULL                | 11.2KB   | 85       | NORMAL | 2024-10-15 01:09:01     | 105          | 0                | 3            | 3916065609563790778 | http://10.0.237.118:28040/api/meta/header/3321324 | http://10.0.237.118:28040/api/compaction/show?tablet_id=3321324 |
| 3321324  | 4550587   | 10006     | 0          | 233     | 0           | 233               | 0                     | 241              | 0                    | 2024-10-15 10:36:35 | 11.2KB   | 85       | NORMAL | 2024-10-15 01:09:01     | 105          | 0                | 3            | 859474551383161951  | http://10.0.37.64:28040/api/meta/header/3321324   | http://10.0.37.64:28040/api/compaction/show?tablet_id=3321324   |
| 3321328  | 3321329   | 10005     | 0          | 241     | 0           | 241               | 0                     | -1               | 0                    | NULL                | 7.5KB    | 69       | NORMAL | 2024-10-15 01:09:01     | 105          | 0                | 1            | 3303042603235400719 | http://10.0.112.177:28040/api/meta/header/3321328 | http://10.0.112.177:28040/api/compaction/show?tablet_id=3321328 |
| 3321328  | 3321331   | 10004     | 0          | 241     | 0           | 241               | 0                     | -1               | 0                    | NULL                | 7.5KB    | 69       | NORMAL | 2024-10-15 01:09:01     | 105          | 0                | 1            | 2233629211880957783 | http://10.0.43.92:28040/api/meta/header/3321328   | http://10.0.43.92:28040/api/compaction/show?tablet_id=3321328   |
| 3321328  | 4550582   | 10006     | 0          | 241     | 0           | 241               | 0                     | -1               | 0                    | NULL                | 7.5KB    | 69       | NORMAL | 2024-10-15 01:09:01     | 105          | 0                | 1            | 859474551383161951  | http://10.0.37.64:28040/api/meta/header/3321328   | http://10.0.37.64:28040/api/compaction/show?tablet_id=3321328   |
| 3321332  | 3321333   | 10007     | 0          | 241     | 0           | 241               | 0                     | -1               | 0                    | NULL                | 7.4KB    | 67       | NORMAL | 2024-10-15 01:09:01     | 105          | 0                | 1            | 3916065609563790778 | http://10.0.237.118:28040/api/meta/header/3321332 | http://10.0.237.118:28040/api/compaction/show?tablet_id=3321332 |
| 3321332  | 3321334   | 10005     | 0          | 241     | 0           | 241               | 0                     | -1               | 0                    | NULL                | 7.4KB    | 67       | NORMAL | 2024-10-15 01:09:01     | 105          | 0                | 1            | 3303042603235400719 | http://10.0.112.177:28040/api/meta/header/3321332 | http://10.0.112.177:28040/api/compaction/show?tablet_id=3321332 |
| 3321332  | 4550583   | 10006     | 0          | 241     | 0           | 241               | 0                     | -1               | 0                    | NULL                | 7.4KB    | 67       | NORMAL | 2024-10-15 01:09:01     | 105          | 0                | 1            | 859474551383161951  | http://10.0.37.64:28040/api/meta/header/3321332   | http://10.0.37.64:28040/api/compaction/show?tablet_id=3321332   |
| 3321336  | 3321337   | 10004     | 0          | 241     | 0           | 241               | 0                     | -1               | 0                    | NULL                | 6.4KB    | 52       | NORMAL | 2024-10-15 01:09:01     | 105          | 0                | 1            | 2233629211880957783 | http://10.0.43.92:28040/api/meta/header/3321336   | http://10.0.43.92:28040/api/compaction/show?tablet_id=3321336   |
| 3321336  | 3321338   | 10007     | 0          | 241     | 0           | 241               | 0                     | -1               | 0                    | NULL                | 6.4KB    | 52       | NORMAL | 2024-10-15 01:09:01     | 105          | 0                | 1            | 3916065609563790778 | http://10.0.237.118:28040/api/meta/header/3321336 | http://10.0.237.118:28040/api/compaction/show?tablet_id=3321336 |
| 3321336  | 3321339   | 10005     | 0          | 241     | 0           | 241               | 0                     | -1               | 0                    | NULL                | 6.4KB    | 52       | NORMAL | 2024-10-15 01:09:01     | 105          | 0                | 1            | 3303042603235400719 | http://10.0.112.177:28040/api/meta/header/3321336 | http://10.0.112.177:28040/api/compaction/show?tablet_id=3321336 |
| 3321340  | 3321342   | 10004     | 0          | 233     | 0           | 233               | 0                     | -1               | 0                    | NULL                | 11.4KB   | 89       | NORMAL | 2024-10-15 01:09:01     | 105          | 0                | 3            | 2233629211880957783 | http://10.0.43.92:28040/api/meta/header/3321340   | http://10.0.43.92:28040/api/compaction/show?tablet_id=3321340   |
| 3321340  | 3321343   | 10007     | 0          | 233     | 0           | 233               | 0                     | -1               | 0                    | NULL                | 11.4KB   | 89       | NORMAL | 2024-10-15 01:09:01     | 105          | 0                | 3            | 3916065609563790778 | http://10.0.237.118:28040/api/meta/header/3321340 | http://10.0.237.118:28040/api/compaction/show?tablet_id=3321340 |
| 3321340  | 4550584   | 10006     | 0          | 233     | 0           | 233               | 0                     | 241              | 0                    | 2024-10-15 10:36:35 | 11.4KB   | 89       | NORMAL | 2024-10-15 01:09:01     | 105          | 0                | 3            | 859474551383161951  | http://10.0.37.64:28040/api/meta/header/3321340   | http://10.0.37.64:28040/api/compaction/show?tablet_id=3321340   |
+----------+-----------+-----------+------------+---------+-------------+-------------------+-----------------------+------------------+----------------------+---------------------+----------+----------+--------+-------------------------+--------------+------------------+--------------+---------------------+---------------------------------------------------+-----------------------------------------------------------------+

报错的tabletid为3321304,版本都是241,VisibleVersion是233,这么看,3321304这个tablet应该没问题啊,都是241,那为啥VisibleVersion却是233呢?

按照https://forum.mirrorship.cn/t/topic/14520 这个帖子里所说的,应该是show tablet from servicecloud.MESOracleBufferHitRateCollected_sr_duplicate PARTITION (p20241015); 里,对于3321304这个tabletid,有241的也有233的,然后把233的设置成bad,表就能自动恢复了,但是现在只有241,没有233,应该怎么处理呢?

源集群下面几个参数适当调大点,再观察下还会不会出现:
inc_rowset_expired_sec
tablet_rowset_stale_sweep_time_sec
tablet_max_versions