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

release/v20.07: Remove vlog file if bootstrap, syncDir or mmap fails (#1434) #1436

Merged
merged 1 commit into from
Aug 17, 2020

Conversation

jarifibrahim
Copy link
Contributor

@jarifibrahim jarifibrahim commented Jul 17, 2020

The createVlogFile function creates a new vlog file. The function apart
from creating a new file, bootstraps it, syncs it to the disk, and mmaps it.

If any of the three operations fail, we will end up with a file on the
disk but the vlog.maxFid will not be updated.

On the next attempt to create the vlog files, we will get a "File
already exists" error. This commit fixes this issue by removing the file
if createVlogFile encounters any error.

Fixes DGRAPH-1930

(cherry picked from commit dfcca75)


This change is Reviewable

The createVlogFile function creates a new vlog file. The function apart
from creating a new file, bootstraps it, syncs it to the disk, and mmaps it.

If any of the three operations fail, we will end up with a file on the
disk but the vlog.maxFid will not be updated.

On the next attempt to create the vlog files, we will get a "File
already exists" error. This commit fixes this issue by removing the file
if createVlogFile encounters any error.

Fixes DGRAPH-1930

(cherry picked from commit dfcca75)
@jarifibrahim jarifibrahim added the cherry-pick Cherry pick pull requests label Jul 17, 2020
@stale stale bot added the status/stale The issue hasn't had activity for a while and it's marked for closing. label Aug 16, 2020
@hypermodeinc hypermodeinc deleted a comment from stale bot Aug 17, 2020
@stale stale bot removed the status/stale The issue hasn't had activity for a while and it's marked for closing. label Aug 17, 2020
@jarifibrahim jarifibrahim merged commit c146f49 into release/v20.07 Aug 17, 2020
@jarifibrahim jarifibrahim deleted the ibrahim/r20.07-vlog-file-exists branch August 17, 2020 11:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cherry-pick Cherry pick pull requests
Development

Successfully merging this pull request may close these issues.

2 participants