Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(table): sync SST to disk after creation #1625

Merged
merged 1 commit into from
Dec 23, 2020
Merged

Conversation

NamanJain8
Copy link
Contributor

@NamanJain8 NamanJain8 commented Dec 23, 2020

SST files were not sync'ed to disk by default. Machine crash may happen before the explicit sync (which happens at DB close), leading to an inconsistent state and badger not able to open.
It is better to explicitly do a sync. This PR explicitly Msync the SST and removes the table options SyncWrites.


This change is Reviewable

@NamanJain8 NamanJain8 merged commit c20628f into master Dec 23, 2020
@NamanJain8 NamanJain8 deleted the naman/sync-sst branch December 23, 2020 08:14
NamanJain8 added a commit that referenced this pull request Jan 5, 2021
This PR adds debug information for the crash in `initIndex`. We suspect that it may be due to unsynced mmap (#1625), or because of mishandling of SST files.
NamanJain8 added a commit that referenced this pull request Jan 18, 2021
SST files were not sync'ed to disk by default. Machine crash may happen before the explicit sync (which happens at DB close), leading to an inconsistent state and badger not able to open. It is better to explicitly do a sync.
NamanJain8 added a commit that referenced this pull request Jan 18, 2021
SST files were not sync'ed to disk by default. Machine crash may happen before the explicit sync (which happens at DB close), leading to an inconsistent state and badger not able to open. It is better to explicitly do a sync.
NamanJain8 added a commit that referenced this pull request Jan 18, 2021
This PR adds debug information for the crash in `initIndex`. We suspect that it may be due to unsynced mmap (#1625), or because of mishandling of SST files.
NamanJain8 added a commit that referenced this pull request Jan 18, 2021
This PR adds debug information for the crash in `initIndex`. We suspect that it may be due to unsynced mmap (#1625), or because of mishandling of SST files.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants