Skip to content

fix: keep file delete when secondary storage returns 403 - #15984

Closed
gyanu2507 wants to merge 1 commit into
LibreChat-AI:devfrom
gyanu2507:fix/file-delete-secondary-fail
Closed

gyanu2507 wants to merge 1 commit into
LibreChat-AI:devfrom
gyanu2507:fix/file-delete-secondary-fail

Conversation

@gyanu2507

@gyanu2507 gyanu2507 commented Sep 16, 2026 •

Copy link
Copy Markdown

Fixes #15971

User-initiated delete already dropped the DB row after a failed S3 unlink (the retention sweep in #15608 taught that path some backoff). The code-env / local-disk pass still aborted, so a 403 from the extra store left the row in place and the UI retried forever.

The secondary delete is now non-fatal: log it, keep going, let the DB row drop. Test covers a 403 from the extra store.

User-initiated delete already dropped the DB row after a failed
S3 unlink. The code-env / local-disk pass still aborted, so a
403 from the extra store left the row in place.

Fixes LibreChat-AI#15971
@codegraph-librechat codegraph-librechat Bot added 🗺️ File Storage codegraph: the taxonomy area this belongs to (classifier, confidence ≥ 0.9) 🗺️ Server Core codegraph: the taxonomy area this belongs to (classifier, confidence ≥ 0.9) labels Oct 1, 2026
@codegraph-librechat codegraph-librechat Bot added 🗺️ Platform Security codegraph: the taxonomy area this belongs to (classifier, confidence ≥ 0.9) 🗺️ Core Infra & Sec codegraph: the taxonomy area this belongs to (classifier, confidence ≥ 0.9) labels Oct 9, 2026
@lia-by-librechat

Copy link
Copy Markdown
Contributor

Thank you, @gyanu2507, for identifying and testing the secondary-storage 403 path. Closing in favor of canonical #17228: failed secondary cleanup retains primary bytes and metadata for safe retry rather than swallowing the failure and dropping the record. Its regression coverage includes secondary 401/403/500 failures. The broader manual-delete backoff request in #15971 remains separate.

@lia-by-librechat lia-by-librechat Bot closed this Oct 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🗺️ Core Infra & Sec codegraph: the taxonomy area this belongs to (classifier, confidence ≥ 0.9) 🗺️ File Storage codegraph: the taxonomy area this belongs to (classifier, confidence ≥ 0.9) 🗺️ Platform Security codegraph: the taxonomy area this belongs to (classifier, confidence ≥ 0.9) 🗺️ Server Core codegraph: the taxonomy area this belongs to (classifier, confidence ≥ 0.9)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant