[JAVA-512] Ability to retrieve GridFSFile from oplog collection Created: 30/Jan/12 Updated: 02/Sep/15 Resolved: 02/Sep/15 |
|
| Status: | Closed |
| Project: | Java Driver |
| Component/s: | GridFS |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Improvement | Priority: | Minor - P4 |
| Reporter: | Richard Louapre | Assignee: | Unassigned |
| Resolution: | Won't Fix | Votes: | 0 |
| Labels: | driver | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Description |
|
When monitoring oplog for GridFS documents. It would be a good idea to have the ability to retrieve the object directly from this collection. |
| Comments |
| Comment by Ross Lawley [ 02/Sep/15 ] |
|
There is a new GridFS implementation |
| Comment by Scott Hernandez (Inactive) [ 30/Jan/12 ] |
|
You do not want to query the oplog for those. You would want to be able to catch them on the stream of documents being written to the oplog so you don't have to query, and that isn't easy since the event which will trigger your "I found a gridfs file" would be the last doc in the files collection. All the chunks will be written first as you can imagine. You are better to use the gridfs system as it will be faster, most likely in all cases. |
| Comment by Richard Louapre [ 30/Jan/12 ] |
|
If I insert a new GridFS document using mongofiles utility. I can see multiple entries in oplog.rs for this operation:
Anyway if there is no performance impact to get the GridFSDile from GridFS interface I will use that option. |
| Comment by Scott Hernandez (Inactive) [ 30/Jan/12 ] |
|
This doesn't make a lot of sense, unfortunately. The oplog entries are single documents and you won't have a full GridFSFile in a single document. You should get the _id from the oplog entry (insert/update operation) and just get the GridFSFile from the GridFS interface for that file. This works well, and should be fast as the file was just updated. |