Skip to content

Allow for separating persistent state and log directories #758

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

Merged
merged 4 commits into from
Feb 22, 2020

Conversation

dominiklohmann
Copy link
Member

It's currently not possible to have different directories for the persistent state and the log files.

The --directory option is the only way to specify the directory for all state. Inside this dir, VAST creates a directory log that contains all ASCII logs.

This PR adds a new option named --log-directory that optionally allows setting the directory for the logs only.

@dominiklohmann dominiklohmann added the feature New functionality label Feb 14, 2020
@dominiklohmann dominiklohmann requested a review from a team February 14, 2020 10:02
@dominiklohmann dominiklohmann force-pushed the story/ch11553 branch 4 times, most recently from 9b1cc47 to 3abff93 Compare February 14, 2020 11:00
@mavam
Copy link
Member

mavam commented Feb 14, 2020

This is useful. However, from a UX perspective I think it's weird to specify both --directory and --log-directory. More natural IMO would be to have --log-directory and --db-directory. (But both would default to --directory.)

@dominiklohmann
Copy link
Member Author

I mean, speaking from a UX perspective, it is usually expected that --directory (or -C, not -d as we have it currently) sets the working directory of the binary.

Adding a separate DB directory can be done, but I'm not sure if it makes any sense.

In any case, the defaults would then have to be changed:

  • system.log-directory falls back to sys.directory / vast.db / log
  • system.db-directory falls back to sys.directory / vast.db

This would be not be a backwards-compatible change.

Copy link
Member

@mavam mavam left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a wording nit on the changelog.

@mavam
Copy link
Member

mavam commented Feb 14, 2020

[..] it is usually expected that --directory (or -C, not -d as we have it currently) sets the working directory of the binary

Yeah, that actually remains the same. My point was more like that we are now starting to differentiate, maybe we'll even get --archive-directory, --index-directory, --schema-directory, and even more eventually. Because the semantics of specifying them in addition to --director is confusing (what takes precedence when all a given?), I would argue that mixing them should result in an error: either specify one top-level directory or the more granular options.

@dominiklohmann
Copy link
Member Author

Let’s discuss this on Monday. I’d rather change the directory option to work like most other UNIX CLI tools have their directory option work. Especially with regards to our focus on UX.

@dominiklohmann
Copy link
Member Author

@mavam I have discussed this with @0ortmann, in order to determine what the natural and expected behavior is for him from a UX standpoint. This is what we converged on:

  • Drop --directory completely.
  • Add --log-diretory, and --state-directory (naming tbd).
  • Change the defaults: $PWD/log for system.log-directory, and $PWD/db for system.state-directory.

@dominiklohmann dominiklohmann merged commit 2d34ea3 into master Feb 22, 2020
@dominiklohmann dominiklohmann deleted the story/ch11553 branch February 22, 2020 07:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants