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 deadlock in tsm1/file_store #6277

Merged
merged 2 commits into from
Apr 12, 2016

Conversation

PierreF
Copy link
Contributor

@PierreF PierreF commented Apr 11, 2016

This fix issue #6271

It remove the RLock from FileStore.locations.

This function is only called by newKeyCursor which itself is only called by FileStore.KeyCursor. FileStore.KeyCursor already acquire the RLock.

@e-dard
Copy link
Contributor

e-dard commented Apr 11, 2016

LGTM 👍

@benbjohnson I checked this against your recent performance PR and it doesn't seem to get in the way of your changes.

@e-dard
Copy link
Contributor

e-dard commented Apr 11, 2016

@PierreF before we can accept this change, can you please sign the CLA here. Also, please add a CHANGELOG entry.

@PierreF
Copy link
Contributor Author

PierreF commented Apr 11, 2016

CLA signed and changelog updated.

@e-dard e-dard added this to the 0.13.0 milestone Apr 11, 2016
@jsternberg
Copy link
Contributor

@PierreF can you rebase this change?

@@ -514,15 +514,14 @@ func (f *FileStore) BlockCount(path string, idx int) int {

// locations returns the files and index blocks for a key and time. ascending indicates
// whether the key will be scan in ascending time order or descenging time order.
// This function assumes the read-lock has been taken.
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you add this same comment to newKeyCursor?

@PierreF
Copy link
Contributor Author

PierreF commented Apr 12, 2016

Rebase + comment added

@jsternberg
Copy link
Contributor

Merging this since the Windows test failure doesn't seem to have anything to do with Windows.

@jsternberg jsternberg merged commit a24f442 into influxdata:master Apr 12, 2016
timhallinflux added a commit that referenced this pull request Dec 20, 2016
v0.13.0 -- Added PR #6277. 
- [#6277](#6277): Fix deadlock in tsm1/file_store
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants