[DRIVERS-2062] Modify GridFS spec to support sessions, transactions and causal consistency Created: 30/Aug/17  Updated: 24/Mar/23

Status: Backlog
Project: Drivers
Component/s: GridFS
Fix Version/s: None

Type: Spec Change Priority: Major - P3
Reporter: Robert Stam Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
is depended on by PHPLIB-320 Support session option for GridFS ope... Blocked
is depended on by CXX-2150 Support sessions in GridFS Closed
is depended on by DRIVERS-559 GridFS with multi-document transactio... Backlog
Duplicate
Issue split
split to JAVA-4890 Multidocument transaction support in ... Backlog
Related
related to CDRIVER-2332 New "with_opts" functions to support ... Closed
is related to DRIVERS-2110 Some specs provide public APIs but ar... Backlog
Driver Changes: Needed
Quarter: FY24Q2
Driver Compliance:
Key Status/Resolution FixVersion
PERL-1025 Fixed 2.2.0
JAVA-4890 Backlog

 Description   

Server 3.6 is introducing sessions and causal consistency.

Update the GridFS spec to address these new features.



 Comments   
Comment by David Golden [ 20/Apr/20 ]

renato.riccio, Scott has left the company and I'm no longer on the driver's team (same with Jesse).   That said, yes, it will be possible.  IIRC, the problem now is that because GridFS makes multiple secondary reads, they could hit different secondaries with the file in different states of replication.  Causal consistency would ensure that a read that finds the GridFS file document will also find all chunks in secondary reads, even if targeting different secondaries.  A read transaction, would, I think, do the same, but depending on the size of the file, might run into transaction duration limits – I'm not sure on the current state of those for large transactions.

Comment by Renato Riccio [ 20/Apr/20 ]

david.golden scott.lhommedieu Would this allow support for read from secondary in a shared cluster?

Comment by Scott L'Hommedieu (Inactive) [ 21/May/19 ]

I'd look to 4.4 for this.

Comment by David Golden [ 21/May/19 ]

I've closed SPEC-1235 and updated the title to include transactions as well because I don't think we'd implement sessions and not transactions.

Comment by David Golden [ 21/May/19 ]

scott.lhommedieu, is this something we should reconsider for 4.2/4.4 given large transaction support?

Comment by A. Jesse Jiryu Davis [ 30/Apr/18 ]

When we eventually do this, part of the value will be that GridFS can safely read files from secondaries if we enable Causal Consistency: by the time the file record is visible we know all chunks are replicated.

Comment by Bernie Hackett [ 30/Apr/18 ]

After discussion with schwerin, jesse, and shane.harvey, I'm removing this from 4.0. Transactions shouldn't be supported in GridFS (not yet at least), so there is no pressing need to do this work.

Comment by Bernie Hackett [ 06/Sep/17 ]

In particular, this section will have to be updated to deal with sessions:

https://github.com/mongodb/specifications/blob/master/source/gridfs/gridfs-spec.rst#generic-find-on-files-collection

In some drivers (e.g PyMongo), each "file" returned by the cursor is backed by another cursor, and those cursors can't share a session, especially if they are being consumed in multiple threads.

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