Slackbot
11/13/2026, 10:20 AMRocky
11/13/2026, 10:20 AMadministration/management/compaction.md – "Compaction for Shared-data Clusters" — overview, Compaction Score (incl. lake_compaction_score_selector_min_score, lake_ingest_slowdown_threshold, lake_compaction_score_upper_bound), the FE→CN compaction workflow, manual triggering (ALTER TABLE ... COMPACT), viewing tasks (SHOW PROC '/compactions', information_schema.be_cloud_native_compactions), and tuning (lake_compaction_max_tasks, compact_threads, max_cumulative_compaction_num_singleton_deltas, lake_pk_compaction_max_input_rowsets).
• General manual-compaction semantics: ALTER_TABLE.md → "Manual compaction (from 3.1)".
• Shared-data compaction observability + `CANCEL COMPACTION`: deployment/feature-support-shared-data.md.
Vacuum
• There is no dedicated "Vacuum" page in the docs; vacuum in shared-data clusters is documented as AutoVacuum — the automatic garbage collection that runs after compaction — through its FE configs in administration/configuration/FE_parameters/shared_lake_other.md:
• lake_autovacuum_grace_period_minutes (30) — how long old versions are retained after compaction; keep it above your longest query.
• lake_autovacuum_partition_naptime_seconds (180), lake_autovacuum_parallel_partitions (8), lake_autovacuum_stale_partition_threshold (12h).
• Related: faq/shared_data_faq.md ("Why does storage usage appear inflated") and the BE-side vacuum knobs in administration/configuration/BE_parameters/shared_lake_other.md (lake_vacuum_min_batch_delete_size, lake_vacuum_enable_task_timeout).
Two things to be clear about:
• I did not find a user-issued VACUUM SQL statement documented for shared-data tables — vacuum is scheduled automatically by the leader FE. If you were looking for a manual vacuum command, the docs don't describe one.
• For orphan files left by failed loads/compactions, the docs describe a separate tool (bin/meta_tool.sh --operation=lake_datafile_gc), and full vacuum (lake_enable_fullvacuum, 4.0+) isn't covered by a public docs page as far as I can see.
If you need per-version details, the GitHub repo (fe/fe-core/.../lake/vacuum/, be/src/storage/lake/vacuum.cpp) and the StarRocks community Slack/forum are the best places to confirm.
References
• knowledge/qa/shared_data_vacuum_and_storage_cleanup.md (StarRocks knowledge base)
• administration/management/compaction.md
• knowledge/admin_and_operation/shared_data_compaction.md (StarRocks knowledge base)
• knowledge/known_issues/shared_data.md (StarRocks knowledge base)
• administration/configuration/BE_parameters/stats_storage.md
• administration/configuration/BE_parameters/query_loading.mdZurab Kiknavelidze
11/13/2026, 10:21 AMRocky
11/13/2026, 10:22 AMcumulative_compaction_num_threads_per_disk, base_compaction_num_threads_per_disk, update_compaction_num_threads_per_disk (each default 1), max_compaction_concurrency (-1 = unlimited, 0 = off), max_base_compaction_num_singleton_deltas (100), max_cumulative_compaction_num_singleton_deltas (1000), max_update_compaction_num_singleton_deltas (1000), min_*_num_singleton_deltas (5), base_compaction_check_interval_seconds (60), base_compaction_interval_seconds_since_last_operation (86400), max_compaction_candidate_num (40960), tablet_max_versions (1000 — loads fail above it), compact_threads, compaction_max_memory_limit_percent.
• information_schema.be_compactions — per-BE compaction stats: CANDIDATES_NUM, BASE_COMPACTION_CONCURRENCY, CUMULATIVE_COMPACTION_CONCURRENCY, LATEST_COMPACTION_SCORE, CANDIDATE_MAX_SCORE, MANUAL_COMPACTION_*.
• Primary Key tables best practices → "Tradeoff between compaction resource, data freshness and query latency" — the only place that spells out the shared-nothing failure mode and the exact error: Failed to load data into tablet xxx, because of too many versions, current/limit: xxx/xxx.... Note it says shared-nothing has no ingestion-slowdown mechanism; writes just fail.
• Manual compaction ALTER TABLE ... COMPACT (3.1+, applies to shared-nothing too).
• Monitoring metrics: be_base_compaction_requests, be_base_compaction_rowsets_per_second, etc..
Vacuum equivalent — BE garbage collection / disk reclamation
• path_gc_check, path_gc_check_interval_second (86400), path_scan_interval_second — per-data-dir path scan/GC threads.
• tablet_rowset_stale_sweep_time_sec (1800), unused_rowset_monitor_interval (30), max_garbage_sweep_interval (3600), inc_rowset_expired_sec (1800), drop_tablet_worker_count — all in the same BE config page.
• FAQ: "How can I release the storage space of BE nodes?" — remove the trash / snapshot directories; and "How to release disk space immediately after deleting a table?" — DROP TABLE ... FORCE.
• Operation and maintenance FAQ — catalog_trash_expire_second (FE, 24h) → trash_file_expire_time_sec (BE, 24h) two-stage retention; Data Recovery for RECOVER.Rocky
11/13/2026, 10:22 AMSHOW PARTITIONS are cloud-native only), and SHOW PROC '/compactions' lists shared-data jobs, so it isn't your observability path. I could not find a documented "vacuum" command or tuning guide for this mode — for anything beyond the config items above, the GitHub repo (be/src/storage/compaction_manager.cpp, be/src/storage/olap_server.cpp, be/src/olap/data_dir.cpp) or the community Slack is the better source.
References
• administration/configuration/BE_parameters/stats_storage.md
• administration/management/compaction.md
• knowledge/admin_and_operation/shared_data_compaction.md (StarRocks knowledge base)
• knowledge/qa/compaction_score.md (StarRocks knowledge base)
• faq/shared_data_faq.md
• knowledge/qa/shared_data_vacuum_and_storage_cleanup.md (StarRocks knowledge base)Zurab Kiknavelidze
11/13/2026, 10:30 AMRocky
11/13/2026, 10:30 AMcompaction_bytes_total — Unit: Bytes, Description: "Total merged bytes from base compactions and cumulative compactions." Since BE metrics are exported with the starrocks_be_ prefix, starrocks_be_compaction_bytes_total is the same counter (cumulative, monotonically increasing).
How to read it:
• Non-zero and increasing → BE is actually merging rowsets from both base and cumulative compaction. That's complementary evidence, not proof of health.
• Flat at zero → either no compactable rowsets, or compaction is off/blocked (max_compaction_concurrency = 0 disables it).
• Use rate() on it for throughput; the docs also expose pre-computed be_base_compaction_bytes_per_second and be_cumulative_compaction_bytes_per_second (both averages, Bytes/s).
To confirm compaction is keeping up in shared-nothing, pair it with:
• information_schema.be_compactions → CANDIDATE_MAX_SCORE, BASE_COMPACTION_CONCURRENCY, CUMULATIVE_COMPACTION_CONCURRENCY.
• Compaction-score metrics: starrocks_be_tablet_base_max_compaction_score, starrocks_be_tablet_cumulative_max_compaction_score (and ..._update_... for PK tables) — these are per-BE gauges of the last-picked tablet's score.
• Failure counters: be_base_compaction_failed, be_cumulative_compaction_failed.
• tablet_max_versions (default 1000) — if versions pile up, loads fail with "too many versions"; that's the real symptom of compaction lag.
One caveat: the description says base + cumulative only, so it isn't necessarily a full picture for Primary Key tables, which also run update compaction (counted under separate ..._update_... metrics/score). I'm inferring that from the metric naming, not from an explicit doc statement.
If your real question is "is compaction healthy right now," lead with the compaction-score and failure metrics; compaction_bytes_total is a lagging throughput indicator.
References
• administration/management/monitoring/metric_details/a-c.md
• administration/management/monitoring/metric_details/s.md
• knowledge/qa/compaction_score.md (StarRocks knowledge base)
• sql-reference/information_schema/be_compactions.mdZurab Kiknavelidze
11/13/2026, 10:34 AMRocky
11/13/2026, 10:34 AMCANDIDATES_NUM = 0, CANDIDATE_MAX_SCORE = 0 — the compaction manager has no tablets queued for compaction on any of the three BEs, and there's no pending score to report.
• BASE_COMPACTION_CONCURRENCY = 0, CUMULATIVE_COMPACTION_CONCURRENCY = 0, `MANUAL_COMPACTION_ = 0`* — no compaction tasks were executing at the instant you sampled.
• LATEST_COMPACTION_SCORE = 43.5 / 27.5 / 40.9 — per the docs this is "Compaction score of the last compaction task," i.e. a leftover value from the most recently run task, not a current gauge. It is not contradicted by CANDIDATE_MAX_SCORE = 0.
So the natural reading: those BEs did compact tablets that scored in the 27–44 range, finished, and the queue is now empty. That's the healthy-looking combination.
Two caveats I want to be explicit about:
1. This table only defines the fields; it doesn't explain the combination. My reading of "leftover value" follows from the doc wording ("last compaction task"), not from a doc statement about how the value is reset. It's inference, though a fairly safe one.
2. A zero snapshot doesn't prove ongoing health. Shared-nothing compaction is BE-local and triggered periodically (base_compaction_check_interval_seconds 60s; cumulative compaction is triggered around loads), so a single sample can easily land between cycles. Also, if max_compaction_concurrency were set to 0 compaction is disabled outright — worth confirming it's -1 (default) on these BEs.
To actually answer "is compaction working," this snapshot plus a rising starrocks_be_compaction_bytes_total is decent evidence. To answer "is it keeping up," check instead:
• starrocks_be_tablet_base_max_compaction_score / ..._cumulative_max_compaction_score (and ..._update_... for PK tables) — current gauges, shared-nothing only. Alert docs fire on starrocks_fe_max_tablet_compaction_score > 100.
• be_base_compaction_failed / be_cumulative_compaction_failed for errors.
• For ground truth per tablet, SHOW TABLET FROM <tbl> → `VersionCount`; versions piling towards tablet_max_versions (1000) is the real lag symptom ("too many versions" load failures).
Also note information_schema.partitions_meta `MAX_CS`/`AVG_CS` stay unset in shared-nothing, so there's no partition-level score to cross-check against — BE-level is all you get.
References
• administration/configuration/BE_parameters/stats_storage.md
• administration/management/compaction.md
• knowledge/qa/compaction_score.md (StarRocks knowledge base)
• sql-reference/information_schema/be_compactions.md
• sql-reference/information_schema/be_cloud_native_compactions.md
• administration/management/monitoring/metric_details/a-c.mdZurab Kiknavelidze
11/13/2026, 10:39 AMRocky
11/13/2026, 10:39 AMVersionCount is documented as "The total number of data versions" on that replica — i.e. how many rowset versions the tablet is currently retaining. Roughly, each successful load batch pushes one new version, and base/cumulative compaction merges older versions together and drops the intermediate ones.
So 21 means that tablet is holding 21 versions. Against tablet_max_versions (BE, default 1000, mutable), that's about 2% of the ceiling — nowhere near the failure point. The documented failure mode for shared-nothing is:
Two things I'd keep straight: 1. A single 21 is not really pass/fail on its own. The number is a function of load frequency vs. compaction. 21 versions after 21 small loads with no compaction yet is unremarkable; 21 on a tablet loaded once an hour is also fine. What matters is whether it drifts upward over time or oscillates. If it keeps climbing toward the high hundreds across your tablets, compaction is losing ground — that's when you'd bumpFailed to load data into tablet xxx, because of too many versions, current/limit: xxx/xxx. You can reduce the loading job concurrency, or increase loading data batch size...
cumulative_compaction_num_threads_per_disk / base_compaction_num_threads_per_disk (each default 1) or reduce load frequency with bigger batches, per the loading FAQ.
2. It's per replica. SHOW TABLET FROM <tbl> returns one row per replica, so check the distribution rather than one row — e.g. ORDER BY VersionCount DESC.
This is also consistent with your earlier be_compactions output: CANDIDATES_NUM = 0 and CANDIDATE_MAX_SCORE = 0 means these tablets are below the compaction trigger threshold, which is what you'd expect at VersionCount ≈ 21.
One caveat: VersionCount counts all retained versions; not every one is a pending delta awaiting compaction (the min*_num_singleton_deltas / max*_num_singleton_deltas thresholds decide when it fires). The docs define the field but don't spell out that breakdown, so I'm describing the mechanism from the compaction config docs rather than from an explicit statement about VersionCount.
References
• administration/configuration/BE_parameters/stats_storage.md
• sql-reference/sql-statements/table_bucket_part_index/SHOW_TABLET.md
• sql-reference/information_schema/be_tablets.md
• sql-reference/sql-statements/cluster-management/tablet_replica/ADMIN_SHOW_TABLET_STATUS.md
• faq/data_migration/loading/Loading_faq.md
• best_practices/primarykey_table.mdZurab Kiknavelidze
11/13/2026, 10:45 AMRocky
11/13/2026, 10:46 AMNUM_ROWSET is a be_tablets field — the docs define it only as "Number of rowsets in the tablet" — while VersionCount (same number as be_tablets.NUM_VERSION) is "Number of versions in the tablet." They're different units, so they usually don't match:
• A load produces a rowset covering one version; compaction output can cover a whole version range, so a healthy tablet generally has fewer rowsets than versions. The shared-data docs describe the same grouping ("All data files generated by a transaction within a tablet are grouped as a Rowset"), which is the mechanism I'm relying on here.
So 21 versions / 29 rowsets is worth a second look, and I want to be upfront: the docs don't define how either is computed, so I can't tell you authoritatively what makes NUM_ROWSET exceed VersionCount. Two plausible explanations, both inference:
1. NUM_ROWSET may include rowsets no longer in the version path — e.g. compaction output or superseded rowsets still awaiting the stale sweep. The BE has tablet_rowset_stale_sweep_time_sec (default 1800s), unused_rowset_monitor_interval (default 30s), and the metric starrocks_be_unused_rowsets_count ("rowsets will be reclaimed later"), which implies such rowsets exist and are counted somewhere.
2. The two counters may simply be maintained on different bases.
To settle it, use the per-tablet URL that SHOW TABLET gives you — CompactionStatus: http://<be>:8038/api/compaction/show?tablet_id=<id> — which lists the actual rowsets with their version ranges. That's ground truth; NUM_ROWSET on its own isn't.
For your original question, neither number indicates a compaction problem: VersionCount 21 against tablet_max_versions 1000, plus CANDIDATES_NUM = 0, is unremarkable. If you're chasing query latency, NUM_SEGMENT is the more meaningful field — it's segments, not rowsets, that a scan has to read.
If you want a definitive answer on the rowsets-vs-versions relationship, the StarRocks GitHub source (be/src/storage/tablet.cpp, tablet_meta.cpp) or the community Slack is the better place than the docs.
References
• administration/configuration/BE_parameters/stats_storage.md
• knowledge/known_issues/storage.md (StarRocks knowledge base)
• administration/management/compaction.md
• sql-reference/information_schema/be_tablets.md
• administration/configuration/BE_parameters/shared_lake_other.md
• knowledge/qa/compaction_score.md (StarRocks knowledge base)Zurab Kiknavelidze
11/13/2026, 10:49 AMRocky
11/13/2026, 10:49 AMVersion | SHOW TABLET | "Data version number"
VersionCount | SHOW TABLET | "The total number of data versions"
NUM_VERSION | be_tablets | "Number of versions in the tablet"
NUM_ROWSET | be_tablets | "Number of rowsets in the tablet"
MIN_VERSION / MAX_VERSION | be_tablets | "Minimum / Maximum version of the tablet"
Version. A per-tablet, monotonically increasing integer. The primary-key doc states it directly: "The metadata stores the version history of the tablet and information about each version (for example, which rowsets are included). The commit phase of each Loadjob or compaction generates a new version." So a version is a commit point, and every load and every compaction mints one. `SHOW TABLET`'s Version column is a single number — that tablet's current (latest) version — not a count. You'll also see versions as ranges in BE logs/errors, e.g. #version:1 [129 129@0 129].
Rowset. _"The rowset is a logical concept and stores the dataset from a batch of data changes in a tablet"_; its data lives in one or more segment files. One load flush → one rowset; a compaction's output is also a rowset, but it covers a version range rather than a single version. That's the mechanism behind my earlier point: rowsets and versions are different units because a rowset can satisfy many versions.
VersionCount vs NUM_VERSION. Both say "number of versions"; as far as I can tell they're the same underlying value exposed in two places (SHOW TABLET / information_schema.be_tablets) — that's my inference from identical wording, not a doc statement. It is not `MAX_VERSION - MIN_VERSION + 1`: after a compaction replaces versions 6–9 with one version node, the retained version entries are fewer than the numeric span. Treat it as "how many version entries the tablet's metadata currently holds."
NUM_ROWSET. Physical/structural count of rowsets the tablet references. Normally ≤ VersionCount, since a compaction reduces many versions to one. Your 29 > 21 is the anomaly I flagged earlier — the docs don't define how either counter is computed, so I still can't say authoritatively why. Stale rowsets pending sweep (tablet_rowset_stale_sweep_time_sec, default 1800s) is one plausible cause; the ?tablet_id= compaction endpoint is the way to see the actual rowsets.
Why it matters: tablet_max_versions (default 1000) is the ceiling on the version count — exceeding it makes new writes fail with the "too many versions" error. 21 is fine. Note that in shared-data clusters SHOW TABLET returns no version fields at all, only MinVersion, so all of the above is shared-nothing-specific.
Caveat worth repeating: apart from the "commit generates a new version" quote, the doc coverage here is one-line field descriptions. The version-node-vs-numeric-span distinction in particular is my reading of how compaction works, not something the docs state — be/src/storage/tablet_meta.cpp or the community Slack would settle it definitively.
References
• sql-reference/information_schema/be_tablets.md
• sql-reference/sql-statements/table_bucket_part_index/SHOW_TABLET.md
• table_design/table_types/primary_key_table.md
• administration/configuration/BE_parameters/stats_storage.md
• administration/management/compaction.md
ReferencesRocky
11/13/2026, 10:49 AM