In MongoDB 4.0, multi document transactions does not work with GridFS because:
- Transaction is represented in single oplog entry, must be within 16MB limit.
- Default transaction lifetime is only 60 seconds (big files could take a while to upload). Increasing this default is going to affect WT cache pressure.
GridFS with transaction would be a very special case (I don't know if there's any yet).
In PyMongo case, if a `ClientSession` is provided it will attempt to create an index for `fs.files` and `fs.chunks` collections grid_file.pyL196, currently creating an index in a transaction is prohibited in the server.