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

Make sure log_dir is not the same with data_dir for TiKV cluster #947

Closed
shenli opened this issue Nov 29, 2020 · 2 comments · Fixed by #993
Closed

Make sure log_dir is not the same with data_dir for TiKV cluster #947

shenli opened this issue Nov 29, 2020 · 2 comments · Fixed by #993
Assignees
Labels
category/stability Categorizes issue or PR as a stability enhancement. priority/P1 Indicates that the priority of a issue is high. type/enhancement Categorizes issue or PR as related to an enhancement. type/feature-request Categorizes issue as related to a new feature.

Comments

@shenli
Copy link
Member

shenli commented Nov 29, 2020

Feature Request

Is your feature request related to a problem? Please describe:

If the log_dir is set as the same dir with data_dir, clean --log will remove the data in data_dir

Describe the feature you'd like:

Add a pre-flight check to make sure the two dirs are not the same one.

Describe alternatives you've considered:

None

Teachability, Documentation, Adoption, Migration Strategy:

None

@shenli shenli added the type/feature-request Categorizes issue as related to a new feature. label Nov 29, 2020
@AstroProfundis AstroProfundis self-assigned this Nov 29, 2020
@lucklove lucklove added the priority/P1 Indicates that the priority of a issue is high. label Dec 1, 2020
@3pointer
Copy link

3pointer commented Dec 1, 2020

I think the directory is not the key problem. and we should not delete directory directly. if user choose to cleanup log. we need to make sure all files to be deleted have a suffix .log.

@AstroProfundis
Copy link
Contributor

AstroProfundis commented Dec 1, 2020

There are several improves we would do:

  • Not allowing deployment of cluster if the log_dir is the same with data_dir or deploy_dir
  • Not deleting anything if the log_dir is the same as data_dir on clean command
  • Make experimental features with the “experimental” mark more visible
  • Display list of files / directories to be deleted before the confirmation prompt
  • Only delete files with .log extension on clean --log

@AstroProfundis AstroProfundis added category/stability Categorizes issue or PR as a stability enhancement. type/enhancement Categorizes issue or PR as related to an enhancement. labels Dec 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category/stability Categorizes issue or PR as a stability enhancement. priority/P1 Indicates that the priority of a issue is high. type/enhancement Categorizes issue or PR as related to an enhancement. type/feature-request Categorizes issue as related to a new feature.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants