Skip to content

Lock log file before munmap#949

Merged
jarifibrahim merged 1 commit intodgraph-io:masterfrom
connorgorman:lock-log-file-before-munmap
Aug 19, 2019
Merged

Lock log file before munmap#949
jarifibrahim merged 1 commit intodgraph-io:masterfrom
connorgorman:lock-log-file-before-munmap

Conversation

@connorgorman
Copy link
Copy Markdown
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

@connorgorman connorgorman requested a review from a team July 29, 2019 18:04
@CLAassistant
Copy link
Copy Markdown

CLAassistant commented Jul 29, 2019

CLA assistant check
All committers have signed the CLA.

@jarifibrahim
Copy link
Copy Markdown
Contributor

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

Copy link
Copy Markdown
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
Copy Markdown
Contributor

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

@manishrjain
Copy link
Copy Markdown
Contributor

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

@jarifibrahim
Copy link
Copy Markdown
Contributor

@ashish-goswami Please review the PR.

Copy link
Copy Markdown
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