-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
allow to configure qdrant init file with env variable #2316
Conversation
log::warn!("Failed to create init file indicator: {}", err); | ||
} | ||
} | ||
|
||
/// Removes a file that indicates that the server has been started. | ||
/// Use before server initialization to avoid false positives. | ||
pub fn remove_started_file_indicator() { | ||
if std::path::Path::new(INITIALIZED_FILE).exists() { | ||
if let Err(err) = std::fs::remove_file(INITIALIZED_FILE) { | ||
let path = get_init_file_path(); |
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.
Do we have a "migration"-issue here? In case somebody changes this path via an ENV var between two runs, the old file would not be cleaned up. The old file would not be considered for any logic internally, since the path changed but it still remains on disk. So this is the obligation of the caller to delete irritating old files then?
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.
Correct. But I think that is impossible to fix without using a common prefix.
But it will only be left behind if initialization fails, as it is cleaned up right after.
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.
is it worth to have a one sentence documentation addition somewhere?
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.
Add docs for the user to be careful, or to describe when this file is created and cleaned up?
In both cases: sure!
* allow to configure qdrant init file with env variable * Return path type from get_init_file_path --------- Co-authored-by: timvisee <tim@visee.me>
Improvement for cloud support of recovery mode:
Allow to configure star-up indicator file path using env variable