-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
Fix deadlock in tsm1/file_store #6277
Conversation
LGTM 👍 @benbjohnson I checked this against your recent performance PR and it doesn't seem to get in the way of your changes. |
CLA signed and changelog updated. |
@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. |
There was a problem hiding this comment.
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
?
2b1260e
to
d4668af
Compare
Rebase + comment added |
Merging this since the Windows test failure doesn't seem to have anything to do with Windows. |
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.