[SERVER-62680] validate cachedir make local tmp to ensure successful copy Created: 14/Jan/22  Updated: 29/Oct/23  Resolved: 19/Jan/22

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 5.3.0, 5.2.1, 5.0.7

Type: Improvement Priority: Major - P3
Reporter: Daniel Moody Assignee: Daniel Moody
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Depends
Backwards Compatibility: Fully Compatible
Backport Requested:
v5.2, v5.0
Sprint: Dev Platform 2022-01-24
Participants:
Linked BF Score: 9

 Description   

In BF-21589, it was found that the cache file was being removed from the remote server while the file was being copied locally. This resulting in stale file handle exception from the cachedir, however the file was partially copied and in a bad state.

We opt for copying into a local tmp location and moving the tmp destination into the real destination only if the copy successfully complete.s



 Comments   
Comment by Githook User [ 01/Feb/22 ]

Author:

{'name': 'Daniel Moody', 'email': 'daniel.moody@mongodb.com', 'username': 'dmoody256'}

Message: SERVER-62680 write cache retrievals into a tmp location before final destination.

(cherry picked from commit d20d317c08fd48b71f790c1bb013aa61c6f0f4b7)
Branch: v5.2
https://github.com/mongodb/mongo/commit/792c2e072d3a3d7c0cf18e31ae2cfa7bee0ab2b0

Comment by Githook User [ 01/Feb/22 ]

Author:

{'name': 'Daniel Moody', 'email': 'daniel.moody@mongodb.com', 'username': 'dmoody256'}

Message: SERVER-62680 write cache retrievals into a tmp location before final destination.

(cherry picked from commit d20d317c08fd48b71f790c1bb013aa61c6f0f4b7)
Branch: v5.0
https://github.com/mongodb/mongo/commit/2f3915725f3c99a286f9559a90a63630c268b3ce

Comment by Githook User [ 19/Jan/22 ]

Author:

{'name': 'Daniel Moody', 'email': 'daniel.moody@mongodb.com', 'username': 'dmoody256'}

Message: SERVER-62680 write cache retrievals into a tmp location before final destination.
Branch: master
https://github.com/mongodb/mongo/commit/d20d317c08fd48b71f790c1bb013aa61c6f0f4b7

Generated at Thu Feb 08 05:55:46 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.