udoh.chigozie
09/01/2026, 10:55 AMRocky
09/01/2026, 10:55 AMADMIN SHOW AUTOMATED CLUSTER SNAPSHOT statement to monitor status and schedules.
* Improved (v4.1): Added interval-based scheduling, allowing for more granular control over when snapshots are triggered.
Important Notes:
* Architecture: It is only supported on shared-data (compute-storage separated) clusters.
* Beta Warning: Because it is in beta, the system typically only retains the single latest snapshot by default. It is recommended to verify your recovery workflows in a non-production environment first.
If you need a definitive GA timeline for production planning, I recommend checking the StarRocks GitHub Roadmap or asking the maintainers in the #starrocks-user Slack channel.
References
• administration/cluster_snapshot.md
• administration/management/FE_configuration.md
• deployment/shared_data/feature-support-shared-data.mdRocky
09/01/2026, 6:58 PMimage file).
Here is how it works internally:
1. Triggering the Checkpoint
While the FE normally performs checkpoints based on the number of journal logs or a time interval (metadata_checkpoint_seconds), the Automated Cluster Snapshot feature introduces its own timer controlled by automated_cluster_snapshot_interval_seconds (default is 600 seconds).
When this interval is reached, the FE actively triggers a metadata checkpoint. This forces the Leader FE to consolidate the latest BDB JE journal entries into a new metadata image file.
2. Coordination with Object Storage
Once the metadata image is successfully created locally on the FE:
* Metadata Upload: The FE automatically uploads this new image file to the specified object storage (e.g., S3). The path follows the pattern: /{storage_volume}/{service_id}/meta/image/automated_cluster_snapshot_{timestamp}.
* Data Consistency: In shared-data mode, since the actual data (SST files/segments) is already in object storage, the snapshot primarily records the metadata state that points to specific versions of that data. The snapshot ensures that the data files referenced by that specific FE journal ID are not garbage-collected until a newer snapshot is successful.
3. Snapshot Lifecycle
* Single Retention: To save space and simplify management, the system currently only keeps the latest automated snapshot. As soon as a new checkpoint completes and the new snapshot is successfully persisted to object storage, the system automatically marks the previous automated snapshot for deletion.
* Journal IDs: Each snapshot captures a specific fe_journal_id and starmgr_journal_id, which you can view using:
sql
SELECT * FROM information_schema.cluster_snapshots;
Summary
It does effectively force the FE to update the image journal if the automated_cluster_snapshot_interval_seconds has passed. It uses the standard FE checkpointing mechanism but automates the subsequent upload and data-retention logic required for cluster-wide disaster recovery.
References
• administration/cluster_snapshot.md
• administration/management/FE_configuration.md
• sql-reference/sql-statements/cluster-management/nodes_processes/ALTER_SYSTEM.md
References
• administration/cluster_snapshot.mdudoh.chigozie
09/04/2026, 11:24 AMlake_autovacuum_grace_period_minutes is the control for the timeRocky
09/04/2026, 11:24 AMlake_autovacuum_grace_period_minutes has expired.
* The "pin" is only released once a new automated snapshot is successfully created and the old one is dropped.
2. The Role of lake_autovacuum_grace_period_minutes
This parameter acts as a buffer for the live cluster, not specifically for the snapshot. It ensures that files recently marked as "stale" (by compaction or schema changes) stay around long enough for active queries to finish.
* If your snapshot interval is 60 minutes and lake_autovacuum_grace_period_minutes is 30 minutes, the data for your 12:00 PM snapshot is safe until the 1:00 PM snapshot completes.
* Once the 1:00 PM snapshot is done, the 12:00 PM snapshot is deleted, and its unique data files will then be eligible for vacuuming after the 30-minute grace period (around 1:30 PM).
3. Impact of a Large Interval
If you move from a 10-minute interval to a 1-hour interval:
* Storage Overhead: You will likely see higher storage usage in your object bucket. Because you are only taking snapshots every hour, StarRocks must retain all data versions from the "start of the hour" state until the next successful snapshot. If your cluster is write-heavy with frequent compactions, this "ghost data" can add up.
* RPO (Recovery Point Objective): Your potential data loss in a disaster increases. If the cluster fails at 12:59 PM, you can only restore to the 12:00 PM state.
* Checkpoint Pressure: Since the snapshot triggers an FE image checkpoint, a very large interval means the FE has more journal logs to replay and consolidate during that checkpoint, which might lead to a longer "Snapshotting" phase.
What else do you need?
To ensure this setup is robust for production, consider the following:
1. Monitor Snapshot Success: Regularly query information_schema.cluster_snapshot_jobs to ensure the snapshots aren't failing due to storage timeouts or FE overhead.
2. Storage Volume Permissions: Ensure the FE has DeleteObject permissions on the storage volume. If the FE can't delete the old snapshot metadata, you might end up with multiple metadata images even though the system technically only "retains" one.
3. Manual Snapshots for Milestones: Since automated snapshots only keep the single latest version, use ADMIN SET MANUAL CLUSTER SNAPSHOT before major maintenance or application releases if you need a guaranteed fallback point that won't be overwritten by the next hourly cycle.
References
• administration/cluster_snapshot.md
• administration/management/FE_configuration.md
• faq/shared_data_faq.md
References
• administration/management/FE_configuration.md
• faq/shared_data_faq.md
• administration/cluster_snapshot.mdRocky
09/04/2026, 11:24 AMRocky
09/04/2026, 11:24 AMlake_autovacuum_grace_period_minutes.
Here is how a 1-hour interval impacts your data and storage:
1. The Snapshot "Pin" Mechanism
When a snapshot is taken (e.g., at T=0), it references a specific set of data files (segments/SSTs) in object storage. Even if compaction runs 10 minutes later (T=10) and creates new versions of those tablets, the old data files are not deleted by the AutoVacuum process.
The system "pins" all files referenced by the currently active automated snapshot. These files are protected from garbage collection regardless of your vacuum grace period settings.
2. Impact of a Large Interval (1 Hour)
If you set automated_cluster_snapshot_interval_seconds to 3600 (1 hour), the following happens:
* Data Protection: Your data is safe. The 1-hour-old snapshot remains fully functional because the files it needs are locked in object storage.
* Storage Inflation: Because AutoVacuum is blocked from cleaning up files referenced by the active snapshot, your object storage usage will temporarily increase. It will hold both the "stale" files (from the T=0 state) and the "new" files (generated by compactions/loads between T=0 and T=60).
* The "Release" Moment: As soon as the next automated snapshot is successfully created (T=60), the system drops the reference to the T=0 snapshot. At this point, the AutoVacuum process is finally allowed to clean up the files from the first snapshot, provided they also satisfy the lake_autovacuum_grace_period_minutes.
3. Interaction with Grace Period
The lake_autovacuum_grace_period_minutes (default 30 min) is a "safety buffer" for historical data versions that are not necessarily part of a snapshot (e.g., versions created and then immediately superseded by another load).
* If Grace Period < Snapshot Interval (30m < 60m): The snapshot protection is the dominant factor. Files will be kept for at least 60 minutes (until the next snapshot).
* If Grace Period > Snapshot Interval (120m > 60m): The grace period is the dominant factor. Files may be kept for 120 minutes even if the snapshot that referenced them has already been replaced.
Summary
Setting a 1-hour interval is safe for data integrity, but you should expect storage usage to peak just before the next snapshot is taken, as it must retain every file version that has been superseded by compaction during that entire hour.
References
• administration/cluster_snapshot.md
• administration/management/FE_configuration.md
• deployment/shared_data/feature-support-shared-data.md
• faq/shared_data_faq.mdRocky
09/04/2026, 11:25 AMlake_autovacuum_grace_period_minutes.
* The metadata state referenced by the currently active Cluster Snapshot.
* Active long-running queries.
2. Impact of a 1-Hour Interval
If you set the snapshot interval to 1 hour:
* Storage Inflation: Even if compaction runs frequently and the lake_autovacuum_grace_period_minutes (default 30 min) has passed, the data files that were part of the cluster state at the time of the last snapshot cannot be deleted. They are "pinned" by the snapshot metadata.
* Retention Period: Files referenced by a snapshot will persist for at least the duration of your snapshot interval. For example, a file compacted away at minute 5 of your hour will remain in object storage for another 55 minutes until the next snapshot is successfully created and the old one is replaced.
* Peak Usage: You will see a "sawtooth" pattern in storage usage. Storage will grow as compactions create new versions while the snapshot holds onto the old versions. Usage will drop sharply only after a new snapshot is completed and the AutoVacuum process is allowed to clear the now-unreferenced "pinned" files.
3. The Formula
Effectively, the actual retention time for a data file that has been superseded by compaction is:
Retention Time =Summary for your 1-hour test case: * If Grace Period (30m) < Snapshot Interval (60m): The snapshot interval is the dominant factor. Your storage will hold onto old files for up to 60 minutes. * Compaction is not blocked: Compaction continues to run normally and create new, optimized files. However, the cleanup of the old source files is what gets delayed. * Safety: This is actually the intended behavior for Disaster Recovery. It ensures that if you need to restore the cluster to that 1-hour-old snapshot, every single data file referenced by that metadata image is guaranteed to still exist in object storage. References • administration/cluster_snapshot.md • administration/management/FE_configuration.md • faq/shared_data_faq.md • deployment/shared_data/feature-support-shared-data.md References • administration/management/FE_configuration.md • administration/cluster_snapshot.mdmax(Time until next Snapshot, lake_autovacuum_grace_period_minutes)
udoh.chigozie
09/04/2026, 11:32 AMRocky
09/04/2026, 11:32 AMlake_autovacuum_grace_period_minutes.
* Result: Since it is now 11:00 AM, a file created at 9:20 AM is already 100 minutes old. If your grace period is 30 minutes, AutoVacuum will delete these orphaned files almost immediately after the new cluster starts.
3. When does the 9:00 AM Snapshot get released?
* The Interval Trigger: Since the automated_cluster_snapshot_interval_seconds is 1 hour and the last snapshot was 2 hours ago (9:00 AM), the FE will immediately trigger a new metadata checkpoint and snapshot shortly after the cluster becomes healthy (usually within a few minutes of startup).
* The Handover: Once the new snapshot (e.g., automated_cluster_snapshot_1105) is successfully uploaded to object storage, the system will delete the 9:00 AM snapshot metadata.
* The "Pin" Release: Only at this moment is the "pin" on the specific 9:00 AM state released. However, as mentioned, since those files are still your "current" data, they remain safe until the next round of compactions on the new cluster.
Summary of Retention at 11:00 AM:
Data Category | Status at 11:00 AM Restoration
Files from 9:00 AM state | Retained. They are the current live data.
Files from Snapshot A | Retained. Pinned until the first successful snapshot at ~11:05 AM.
Files from 900–949 AM | Deleted quickly. They are not in the 9:00 AM metadata and exceed the 30-min grace period relative to 11:00 AM.
Key Takeaway: If you restore a snapshot that is older than your lake_autovacuum_grace_period_minutes, any progress made (compactions/intermediate loads) between that snapshot and the crash is treated as garbage and cleaned up immediately by the new cluster. This is why it is generally recommended to keep the snapshot interval relatively frequent (e.g., the default 10 mins) or ensure your grace period is large enough to cover your recovery window (MTTR) window if you want to inspect those "orphaned" files.
References
• administration/cluster_snapshot.md
• faq/shared_data_faq.md
• administration/management/FE_configuration.md
References
• administration/cluster_snapshot.md
• administration/management/Backup_and_restore.md
• administration/management/FE_configuration.mdRocky
09/04/2026, 11:32 AMudoh.chigozie
09/17/2026, 7:50 AMRocky
09/17/2026, 7:51 AMsql
-- Create a policy
CREATE ROW ACCESS POLICY region_policy
AS (region_col VARCHAR) RETURNS BOOLEAN ->
region_col = 'North America';
-- Apply it to a table
ALTER TABLE sales_data ADD ROW ACCESS POLICY region_policy ON (region);
* System View: You can monitor these using the information_schema.policy_references view.
2. Open-source Edition (Apache Ranger)
The native CREATE ROW ACCESS POLICY syntax is generally not supported in the Open-source Edition. Instead, open-source users implement RLS through Apache Ranger integration (supported from v3.1.9 onwards).
* How it works: You configure the StarRocks Ranger plugin. You then define "Row-level Filter" policies in the Ranger Admin UI.
* Automatic Injection: When a user queries a table, the StarRocks FE communicates with Ranger to see if a filter should be injected into the SQL execution plan (e.g., automatically adding a WHERE region = 'xxx' clause).
3. Alternative: View-based RLS
Regardless of edition, you can always implement a basic form of RLS using Views combined with the current_user() or current_role() functions. This is a common workaround if you do not want to manage an external Ranger service:
sql
CREATE VIEW secure_sales_view AS
SELECT * FROM sales_data
WHERE region IN (
SELECT region FROM user_permissions
WHERE username = current_user()
);
Summary Table
Feature | Open-source Edition | Enterprise Edition
Native SQL Policies | No | Yes (CREATE ROW ACCESS POLICY)
Apache Ranger Integration | Yes (v3.1.9+) | Yes
View-based RLS | Yes | Yes
References
• administration/user_privs/authorization/ranger_plugin.md
• faq/operation_maintenance_faq.md
• sql-reference/sys/policy_references.md
References
• sql-reference/sys/policy_references.md
• sql-reference/sql-statements/cluster-management/resource_group/CREATE_RESOURCE_GROUP.md
• sql-reference/sql-statements/account-management/CREATE_USER.md
• sql-reference/sql-statements/table_bucket_part_index/CREATE_TABLE.md
• sql-reference/data-types/semi_structured/STRUCT.md