talent-plan/tinykv

snapshot use directio, which is not supported by tmpfs

oocococo opened this issue · 1 comments

While applying snapshot, https://github.com/Connor1996/badger will try to invoke directio.OpenFile

However, directio is not supported by linux tmpfs issue1 issue2, which is the default storage location of tinykv test.
It will block forever while apply snapshot.

I think maybe we can fallback from directio.OpenFile to os.OpenFile when O_DIRECT is not supported.

Merge the PR, please update badger dependency.