OpenAICloudflare Developer PlatformApr 22, 2026, 12:00 AM

R2 - R2 Data Catalog snapshot expiration now removes unreferenced data files

A condensed section focused on the key takeaways first.

Original Post

Quick Digest

Summary

A condensed section focused on the key takeaways first.

openaienmodel: gpt-5-mini-2025-08-07

R2 Data Catalog snapshot expiration now removes unreferenced data files

Key Points

  • Snapshot expiration now deletes unreferenced data files
  • Reduces storage costs and manual maintenance
  • Enable via Wrangler snapshot-expiration settings

Summary

R2 Data Catalog (the managed Apache Iceberg catalog in R2) now removes unreferenced data files from R2 storage when snapshots are expired. Previously snapshot expiration only cleaned up Iceberg metadata (manifests and manifest lists), leaving orphaned data files until you ran manual maintenance (for example, Spark's remove_orphan_files or expire_snapshots). This change reduces storage costs and operational overhead by automating data-file cleanup.

Key Points

  • Automatic deletion of data files that are no longer referenced by retained snapshots when a snapshot is expired.
  • Prior behavior only removed metadata files; stale data files required manual reclamation.
  • Operational impact: lower storage costs and fewer manual maintenance jobs.
  • Example to enable catalog-level expiration via Wrangler: npx wrangler r2 bucket catalog snapshot-expiration enable my-bucket --older-than-days 7 --retain-last 10.
  • See the maintenance documentation for retention semantics and other automatic maintenance operations.

Full Translation

Translations

A translation section that keeps the flow of the original article.

openaijamodel: gpt-5-mini-2025-08-07

R2 - R2 Data Catalog のスナップショット有効期限が参照されないデータファイルを削除するようになりました

R2 Data Catalog のスナップショット有効期限が参照されないデータファイルを削除するようになりました

公開日: 2026-04-22

R2 に組み込まれたマネージドな Apache Iceberg カタログである R2 Data Catalog は、スナップショットの自動有効期限処理中に参照されないデータファイルを削除するようになりました。これにより、ストレージコストが削減され、削除されたデータのスペースを回復するために手動でメンテナンスジョブを実行する必要がなくなります。

これまでの挙動

  • スナップショット有効期限は主に Iceberg のメタデータファイル(manifests や manifest lists)をクリーンアップしていました。
  • アクティブなスナップショットから参照されなくなったデータファイルは、Spark のようなエンジンを使って remove_orphan_filesexpire_snapshots を手動で実行するまで R2 ストレージに残っていました。
  • その結果、追加の運用負荷が発生し、古い(参照されない)データファイルがストレージを消費し続けていました。

今回の改善点

  • スナップショット有効期限処理がメタデータファイルだけでなく、参照されないデータファイルのクリーンアップも自動で行うようになりました。
  • スナップショットが有効期限切れになると、保持されているスナップショットによって参照されなくなったデータファイルは R2 ストレージから削除されます。
  • 結果として、手動での orphan ファイル削除や追加のメンテナンスジョブが不要になり、ストレージコストと運用負荷が低減します。

ターミナル

npx wrangler r2 bucket catalog snapshot-expiration enable my-bucket \ 
--older-than-days 7 \ 
--retain-last 10

スナップショットの有効期限やその他の自動メンテナンス操作の詳細は、table maintenance documentation を参照してください。

R2 - R2 Data Catalog snapshot expiration now removes unreferenced data files | Cloudflare Developer Platform | DocsDigest