-
Notifications
You must be signed in to change notification settings - Fork 237
feat: litt unlock command #1823
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
Changes from 2 commits
2a18cf8
856834b
a5b5ac6
42e3a2a
136e91b
8b64f92
21d3769
a25419a
b9a8f6d
9274b9c
b1958df
57eeab6
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 |
---|---|---|
|
@@ -138,6 +138,21 @@ type Config struct { | |
|
||
// If true, then purge LittDB locks on startup. Potentially useful to get rid of zombie lock files, | ||
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. Didn't quite understand the scenario in which zombie lock files appear? Is it due to some sort of ungraceful termination with containers? 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. Expanded the documentation here:
|
||
// but also dangerous (multiple LittDB processes operating on the same files can lead to data corruption). | ||
// | ||
// When LittDB starts up, it attempts to create lock files. When a validator is forcefully shut down, lock files | ||
// may be left behind. At startup time, if LittDB observes existing lock files, it first checks to see | ||
// if the process that created the lock files is still running. The lock files contain the creator's PID, and so | ||
// LittDB checks to see if there is any process with that PID still running. | ||
// | ||
// Although it should be rare, it's possible that another process may be started with the same PID as the | ||
// PID used to create the lock files. When this happens, LittDB will be prevented from starting up out of | ||
// fear of another process trying to access the same files, even though the original process that created the | ||
// lock files is no longer running. If that happens, this flag is a safe way to force LittDB to start up | ||
// without being blocked by those lock files. BE VERY CERTAIN THAT THE OTHER PROCESS IS ACTUALLY DEAD! | ||
// If two instances of LittDB are running on the same files, it WILL lead to data corruption. | ||
// | ||
// An alternate way to clear the LittDB lock files is via the LittDB CLI with the "litt unlock" command. | ||
// Run "litt unlock --help" for more information. | ||
LittUnsafePurgeLocks bool | ||
|
||
// The rate limit for the number of bytes served by the GetChunks API if the data is in the cache. | ||
|
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.
Should we add some sort of confirmation flow where the user has to say "yes" and if they want to skip there's the
force-unlock
or--force
flag for skipping that flow?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.
Added. You either must type
I know what I am doing
, or include a--force
tag.