-
Notifications
You must be signed in to change notification settings - Fork 54
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: Resolve handful of CLI issues #1318
Changes from 4 commits
fef5551
bf957c4
04deae0
afbd42d
2e8a4b8
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,15 @@ | ||
# DefraDB configuration (YAML) | ||
|
||
# NOTE: Paths below are relative to the DefraDB directory unless otherwise stated. | ||
# By default, the DefraDB directory is "$HOME/.defradb", but | ||
# can be changed via the $DEFRA_ROOTDIR env variable or --rootdir CLI flag. | ||
# The default DefraDB directory is "$HOME/.defradb". It can be changed via the --rootdir CLI flag. | ||
# Relative paths are interpreted as being rooted in the DefraDB directory. | ||
|
||
datastore: | ||
# Store can be badger | memory | ||
# badger: fast pure Go key-value store optimized for SSDs (https://github.com/dgraph-io/badger) | ||
# memory: in-memory version of badger | ||
store: {{ .Datastore.Store }} | ||
badger: | ||
# The path to the database data file(s), relative paths here will be converted to absolute file paths | ||
# on database start. | ||
# The path to the database data file(s). | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. suggestion: I do think it is worth documenting that we will mutate the config file and replace relative paths with absolute paths. I see that as potentially surprising behaviour, and a behaviour that may potentially mess with CI systems (e.g. config files are sometimes directly pulled from source control, and impromptu edits can mess with the next pull) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Currently we don't overwrite the config file. We write a config file when it doesn't exist. For now, the paths written are absolute paths, although what would be nicer is to have relative paths there, but which will probabIy be enabled by a refactor of config. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. for future reference - we chatted over discord, and I was wrong here - it doesnt mutate existing files :) |
||
path: {{ .Datastore.Badger.Path }} | ||
# Maximum file size of the value log files. The in-memory file size will be 2*valuelogfilesize. | ||
# Human friendly units can be used (ex: 500MB). | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
question: Have you tested that this all works on database restart? I.e. to make sure #1293 isnt re-introduced
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I confirm that it works on database restart