Hi Corrie,
Thank you for laying out the scenario and its assumptions so clearly.
I reviewed the available Microsoft documentation. Here are the direct answers to your questions.
First, I could not find any documented requirement for the application to perform extra namespace synchronization for ESE-managed log rollover.
ESE documents the durability of an acknowledged outermost transaction commit when lazy commit is not used. I also found no documented application-side step for separately synchronizing log-file creation, renaming, or rollover performed internally by ESE.
However, the public documentation does not describe the persistence contract of each individual namespace operation performed inside the engine. For that reason, I can confirm only the published ESE transaction guarantee, not a separate guarantee for every internal file-system operation.
Second, Yes. If JET_paramCreatePathIfNotExist is enabled before JetInit, ESE can create missing folders in a path used by the database engine.
See:
Third, the official documentation confirms that the missing folders can be created. It does not state that JET_paramCreatePathIfNotExist, JetCreateDatabase, or the first successful transaction commit separately makes every newly created ancestor-directory entry durable against power loss.
And the FlushFileBuffers function documents flushing a file handle and states that the handle must have GENERIC_WRITE access.
It also describes flushing all open files through a volume handle, but that operation requires administrative privileges. The documentation does not provide a non-administrator sequence that explicitly guarantees persistence of a newly created directory chain as a separate namespace operation.
The ESE transactions documentation also states that, after the database engine acknowledges that a transaction has been committed, its changes are persistent in the database.
The JetCommitTransaction documentation also explains that JET_bitCommitLazyFlush allows the call to return without waiting for the transaction to be flushed to the transaction log, at the cost of durability. For a normal outermost commit without lazy flush, the documented ESE transaction-durability guarantee applies.
That guarantee addresses the committed database transaction. The documentation does not explicitly say that the same commit also establishes the durability of an application-created or newly created parent-directory chain.
Therefore, while the documented ESE calls cover transaction durability and can create the required path, I cannot point to a published Microsoft API contract that provides the additional directory-chain durability guarantee you are asking for.
As you noted, confirming that the path remains present after a process or system restart would show observed behavior, but it would not establish the requested sudden-power-loss guarantee.
Although the public documentation does not establish the additional directory-chain guarantee discussed above, if you have a specific reproducible scenario, please share the API sequence, Windows version, expected result, and actual result, and I can help you investigate the observed behavior.
Hope these information help. If you found my response helpful or informative, I would greatly appreciate it if you could follow this guide for your confirmation.
Thank you.