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

Lock log file before munmap #949

Merged

Conversation

connorgorman
Copy link
Contributor

@connorgorman connorgorman commented Jul 29, 2019

Per the comments in the struct, the logFile should be write-locked when closing or unmapping. There is a potential race condition where an iterator could be reading a value and be holding the RLock but the memory will be unmapped via a call to deleteLogFile(lf *logFile)


This change is Reviewable

@CLAassistant
Copy link

CLAassistant commented Jul 29, 2019

CLA assistant check
All committers have signed the CLA.

@jarifibrahim
Copy link
Contributor

Hey @connorgorman thanks for sending the PR. Can you please sign the CLA?

Copy link
Contributor

@jarifibrahim jarifibrahim left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:lgtm:

Reviewable status: 0 of 1 files reviewed, all discussions resolved (waiting on @ashish-goswami and @manishrjain)

@jarifibrahim
Copy link
Contributor

@connorgorman can you please sign the CLA? We can't merge the PR without the CLA.

@manishrjain
Copy link
Contributor

Looks like the CLA is signed. So, we should be good to merge this PR if still needed.

@jarifibrahim
Copy link
Contributor

@ashish-goswami Please review the PR.

Copy link
Contributor

@ashish-goswami ashish-goswami left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:lgtm:

Reviewable status: 0 of 1 files reviewed, all discussions resolved (waiting on @ashish-goswami and @manishrjain)

@jarifibrahim jarifibrahim merged commit 7a7dd17 into dgraph-io:master Aug 19, 2019
jarifibrahim pushed a commit that referenced this pull request Mar 12, 2020
As per the comments in the struct, the logFile should be write-locked
when closing or unmapping. There is a potential race condition where
an iterator could be reading a value and be holding the RLock but the
memory will be unmapped via a call to deleteLogFile(lf *logFile) .

(cherry picked from commit 7a7dd17)
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.

5 participants