Skip to content

Navigation Menu

Sign in
Sign up

DRIVERS-3618 Require deleting orphaned GridFS file chunks - #1979

Draft
GromNaN wants to merge 3 commits into
mongodb:master from
GromNaN:DRIVERS-3618
Draft

DRIVERS-3618 Require deleting orphaned GridFS file chunks #1979
GromNaN wants to merge 3 commits into
mongodb:master from
GromNaN:DRIVERS-3618

Conversation

@GromNaN

@GromNaN GromNaN commented Sep 1, 2026
edited
Loading

Copy link
Copy Markdown
Member

https://jira.mongodb.org/browse/DRIVERS-3618

Deleting a GridFS file by id now always deletes the chunks with the given files_id, even when no files collection document was deleted. This removes orphaned chunks instead of leaving them in the bucket, which was previously optional (MAY).

The spec also now requires drivers to use the number of deleted documents reported by the delete command on the files collection to decide whether the file existed, instead of running a separate query.

Please complete the following before merging:

  • Is the relevant DRIVERS ticket in the PR title?
  • Update changelog.
  • Test changes in at least one language driver.
  • Test these changes against all server versions and topologies (including standalone, replica set, and sharded clusters).

Deleting a GridFS file now always deletes the chunks with the given files_id,
even when no files collection document was deleted, so orphaned chunks are
removed. Whether the file existed is determined from the delete result on the
files collection, not from a separate query.
GromNaN requested a review from a team as a code owner September 1, 2026 21:25
GromNaN marked this pull request as draft September 1, 2026 21:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@isabelatkinson isabelatkinson Awaiting requested review from isabelatkinson isabelatkinson is a code owner automatically assigned from mongodb/dbx-spec-maintainers-crud

At least 1 approving review is required to merge this pull request.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

1 participant

AltStyle によって変換されたページ (->オリジナル) /