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

Writables inconsistency #4417

Merged
merged 2 commits into from
Apr 21, 2023

Conversation

wusongANKANG
Copy link
Contributor

What problem are we solving?

In our test environment(3master, 3filer, 9volume server), we found that many "volume is read only" errors were reported for a long period of time. It is found that the disk space of a certain volume server node has reached minfreeSpace, so that all volumes on the node are "read only".

Analyze

Theoretically, the error will only last up to 5s (heartbeat time interval). Through the log, it is found that for a long period of time, when the master allocates fid, it will always be allocated to the "read only" volume. The states of master's writable and volume are inconsistent.

It is found that during the vaccum process, volume1 (for example) is on node1, node2, and node3, and only volume1 on node1 satisfies the GarbageRatio >= garbageThreshold condition, while volume1 on node2 and node3 does not.

At this time, only the volume on node1 will be vacuumed. When committing, the disk space of node1 is released after vacuum, then volume1 on node1 will not be "read only", and volume1 will be set to writable. But at this time, the disks of node2 and node3 are full, and volume1 should not be writable. At this time, the writables information of the master is incorrect.

How are we solving the problem?

Check all replicas during vacuum commit, and set volume1 to writable only when all replicas are not "read only".

How is the PR tested?

Checks

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

Wusong Wang and others added 2 commits April 20, 2023 19:43
@chrislusf chrislusf merged commit 2e24070 into seaweedfs:master Apr 21, 2023
5 checks passed
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

2 participants