setInitialSyncFlag and clearInitialSyncFlag both write a document and then call waitUntilDurable(). We hold a lock while calling these functions because a document write requires a lock. However, callers of waitUntilDurable() should not hold locks since significant I/O work may be done.
We wish to add an invariant to waitUntilDurable() against callers with locks in
SERVER-39591. This task is a blocker.