Implement durable S3 attachments and reconciliation
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
## Reconciler experiment — 2026-11-06
|
||||
|
||||
Synthetic unreferenced object `attachments/reconcile-orphan` was inserted directly
|
||||
into the private S3 bucket. No PostgreSQL metadata row was created.
|
||||
|
||||
Dry-run immediately after insertion (`--grace-seconds 60`):
|
||||
{"deleted_orphans":0,"eligible_orphans":0,"grace_seconds":60,"metadata_rows":8,"missing_metadata_objects":0,"mode":"dry_run","orphan_objects":1,"s3_objects":9}
|
||||
|
||||
Apply after the 60-second grace period:
|
||||
{"deleted_orphans":1,"eligible_orphans":1,"grace_seconds":60,"metadata_rows":8,"missing_metadata_objects":0,"mode":"apply","orphan_objects":1,"s3_objects":9}
|
||||
|
||||
Final dry-run:
|
||||
{"deleted_orphans":0,"eligible_orphans":0,"grace_seconds":60,"metadata_rows":8,"missing_metadata_objects":0,"mode":"dry_run","orphan_objects":0,"s3_objects":8}
|
||||
|
||||
The reconciler only deletes S3 keys under the generated `attachments/` prefix that
|
||||
have no metadata and are older than the grace period. A missing S3 object is
|
||||
reported but its metadata is retained for manual repair; referenced and fresh
|
||||
objects are never candidates for deletion.
|
||||
Reference in New Issue
Block a user