[JAVA-3409] GridFS indexes do not created when database is restored with --noIndexRestore Created: 28/Aug/19 Updated: 27/Oct/23 Resolved: 13/Sep/19 |
|
| Status: | Closed |
| Project: | Java Driver |
| Component/s: | None |
| Affects Version/s: | 3.11.0 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Phillip Wirth | Assignee: | Ross Lawley |
| Resolution: | Works as Designed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Description |
|
When restoring a database with {{ --noIndexRestore}} the gridfs indexes, named here do not get created again IF there are already files in grid fs. Expected: the indexes get created. the current code from the 3.11.0 driver is:
|
| Comments |
| Comment by Ross Lawley [ 13/Sep/19 ] |
|
Hi pwirth, Thanks for the ticket. This behavior is as specified in the GridFS Spec. The indexes are only created on writing to GridFS if the files collection is empty. In your scenario you would have to manually recreate the indexes to ensure they exist. Ross |