[GODRIVER-856] Chunks collection files_id_1_n_1 index not unique Created: 27/Feb/19  Updated: 28/Oct/23  Resolved: 07/Mar/19

Status: Closed
Project: Go Driver
Component/s: GridFS
Affects Version/s: None
Fix Version/s: 1.0.0-rc2

Type: Bug Priority: Major - P3
Reporter: Patrick Freed Assignee: Isabella Siu (Inactive)
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

According to the GridFS spec, the {files_id: 1, n: 1} index on the chunks collection is supposed to be unique, but the go driver creates it without specifying that.

This allows orphan chunks to be made when writing a file with an _id that is already present.



 Comments   
Comment by Githook User [ 07/Mar/19 ]

Author:

{'name': 'Isabella Siu', 'email': 'isabella.siu@10gen.com', 'username': 'iwysiu'}

Message: GODRIVER-856 make chunks collection index _id_1_n_1 unique

Change-Id: I0d5cbf569f6da99c0a1d296dc64341b567759d62
Branch: master
https://github.com/mongodb/mongo-go-driver/commit/c1b933911476bf1b423bb882ed5a56d66be8bb48

Comment by Isabella Siu (Inactive) [ 05/Mar/19 ]

Code review url: https://review.gerrithub.io/c/mongodb/mongo-go-driver/+/447112

Generated at Thu Feb 08 08:35:07 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.