[CSHARP-1866] GridFS should check whether indexes already exist before trying to create them Created: 13/Dec/16 Updated: 22/Apr/17 Resolved: 27/Dec/16 |
|
| Status: | Closed |
| Project: | C# Driver |
| Component/s: | GridFS |
| Affects Version/s: | 2.1 |
| Fix Version/s: | 2.4.1 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Tomak Ksenia | Assignee: | Robert Stam |
| Resolution: | Done | Votes: | 0 |
| Labels: | GridFS, Permissions | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
.NET |
||
| Issue Links: |
|
||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||
| Description |
|
In our application we have some security restrictions for user which uses GridFS. |
| Comments |
| Comment by Githook User [ 27/Dec/16 ] |
|
Author: {u'username': u'rstam', u'name': u'rstam', u'email': u'robert@robertstam.org'}Message: |
| Comment by Robert Stam [ 22/Dec/16 ] |
|
I agree with you that applications normally shouldn't do DBA like functions automatically. However, in the case of GridFS the decision was made that most users would treat GridFS like a black box and wouldn't even know that certain indexes need to be created to support GridFS, so drivers create these indexes automatically. The GridFS spec says that drivers should only create the indexes if the collection is empty and the index does not already exist. The .NET driver has a bug in that it is only checking whether the collection is empty It should also check whether the index already exists. |