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

The storage node needs to refine how to load data directories. #215

Closed
ijsong opened this issue Nov 6, 2022 · 0 comments · Fixed by #219 or #181
Closed

The storage node needs to refine how to load data directories. #215

ijsong opened this issue Nov 6, 2022 · 0 comments · Fixed by #219 or #181
Assignees

Comments

@ijsong
Copy link
Member

ijsong commented Nov 6, 2022

Storage node reads all sub-directories of given volumes to load data for log stream replicas regardless of whether they are valid. Sometimes, the storage node reads a sub-directory that the storage node should have removed before fail-over. It doesn't look like a problem since the admin server will wipe garbage replicas. However, the garbage replica can be an obstacle if the admin server wants to rebalance a log stream to migrate a log stream to a storage node where the garbage replica exists.

So it is more comfortable for the storage node not to load unnecessary data directories. Currently, we can do that by setting --data-dirs and --volume-strict-check flags to the storage node, but it is very ambiguous and prone to error. Moreover, there is a limit for the length of arguments - see ARG_MAX; thus, we cannot list all data directories when there are too many log stream replicas.

I am proposing three small changes:

  • Remove --data-dirs and --volume-strict-check flags.
  • Remove unnecessary data directories before starting a storage node or during the bootstrap of a storage node.
  • Add --ignore-malformed-data-directory to allow an incorrect data directory name. The default behavior of a storage node is not to start when there is a bad directory.
ijsong added a commit to ijsong/varlog that referenced this issue Nov 8, 2022
…nd `--volume-strict-check`

This patch deprecates a storage node's `-data-dirs` and `-volume-strict-check` flags. Instead, the
operational script - `start_varlogsn.py` removes data directories not registered to the cluster.

Resolves kakao#215
@ijsong ijsong self-assigned this Nov 22, 2022
@ijsong ijsong closed this as completed in 1972c94 Nov 22, 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
1 participant