[SERVER-76240] Make sure that an FSync command cannot race with shutdown tasks and restart the FSyncLockThread Created: 18/Apr/23  Updated: 23/Jun/23

Status: Backlog
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Task Priority: Major - P3
Reporter: Dianna Hohensee (Inactive) Assignee: Backlog - Storage Execution Team
Resolution: Unresolved Votes: 0
Labels: techdebt
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
related to SERVER-70444 fsync lock/unlock command fails when ... Closed
Assigned Teams:
Storage Execution
Participants:

 Description   

Whether or not this is an issue was being discussed in the PR for SERVER-70444, which is fixing a different problem. From the PR discussion:

"It looks like exitCleanly(code) is the entry point for shutdown, and it calls this shutdown() function that invariants globalInShutdownDeprecated(), and then runs the shutdown tasks. Grepping around for `globalInShutdownDeprecated()`, I see it in the connpoon.cpp code. So I don't think new connections can get in, but an already existing one with perfect timing.... probably could."

My recommendation, if confirmed this is an issue, would be to add a globalInShutdownDeprecated() checks in the FSync code after taking a mutex that excludes other fsync operations from making changes (like the shutdown logic).

 


Generated at Thu Feb 08 06:32:10 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.