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 corrupted mount reads after changes on fh #3536

Merged
merged 1 commit into from
Aug 29, 2022

Conversation

Woellchen
Copy link
Contributor

@Woellchen Woellchen commented Aug 29, 2022

What problem are we solving?

Fix corrupted mount reads after changes on fh. See #3535.
When a file is opened multiple times - no matter if single- or multi-threaded - and something was written, or a metadata attribute was changed, then the following reads would always return wrong / old data until all file handles were closed and the file was reopened.

How are we solving the problem?

The reason was that the outdated reader was not reset properly with a fresh chunk view.
The fix is to reset the reader instance on file handles properly.

How is the PR tested?

With dt tool. See #3535.

Checks

  • I have added unit tests if possible.
  • I will add related wiki document changes and link to this PR after merging.

When a file is opened multiple times - no matter if single- or multi-
threaded - and something was written, or a metadata attribute was
changed, then the following reads would always return wrong / old
data until all file handles were closed and the file was reopened.
The reason was that the outdated reader was not reset properly with a
fresh chunk view.
@chrislusf chrislusf merged commit 00041f6 into seaweedfs:master Aug 29, 2022
@Woellchen Woellchen deleted the fix/mount-corrupted-reads branch August 29, 2022 15:28
@nickb937
Copy link

I've confirmed that this fixes the Sonarr corruption mentioned in #2609

paochiang added a commit to paochiang/seaweedfs that referenced this pull request Oct 16, 2022
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.

None yet

3 participants