If a computer shuts down while bitcoin core is running the entire block index is corrupted and requires reindexing from day 0. This process, at least for my computer, takes more than 10 hours.
I’m not familiar with the code involving the filesystem, however there are methods that could be used to cache data temporarily and write to the disk in a safe way such as that only a small portion of data might be corrupted during power loss.
This could be related to issue #5865