apache / iceberg

Apache Iceberg
https://iceberg.apache.org/
Apache License 2.0
6.49k stars 2.24k forks source link

GCP: Implement SupportsRecoveryOperations for GCSFileIO #11565

Open mrcnc opened 5 days ago

mrcnc commented 5 days ago

Inspired by the initial implementation in S3FileIO, this PR implements SupportsRecoveryOperations for GCSFileIO.

GCP recommends using soft delete instead of object versioning, so this implementation attempts to-restore a soft deleted object first. If soft delete is not enabled (which may be common since it's a relatively new feature), then it attempts to restore a previously deleted version by coping it to the live location, similar to the S3FileIO implementation.