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

Reducing the necessity for --disable-history #107

Open
alexmaco opened this issue Sep 8, 2021 · 1 comment
Open

Reducing the necessity for --disable-history #107

alexmaco opened this issue Sep 8, 2021 · 1 comment
Labels
enhancement New feature or request

Comments

@alexmaco
Copy link
Contributor

alexmaco commented Sep 8, 2021

Frequently, when I open a new terminal session to a machine that's already running zenith from somewhere else, it fails to start, and I have to pass --disable-history, which is also a bit long to type.

I suggest we could add some smarter behavior for this situation - if zenith detects another instance running, it should still start, and display metrics. This could either mean it starts independently of the database, and perhaps shows an indicator to this effect in the top right. or automatically start reading history, but not writing it.

For the second case, when the other zenith instance is stopped, the current instance could race with any other instance to take ownership of the history db, and keep recording.

@bvaisvil bvaisvil added the enhancement New feature or request label Sep 9, 2021
@bvaisvil
Copy link
Owner

bvaisvil commented Sep 9, 2021

Honestly, this annoys me from time to time too.

Starting up and displaying I think is the right thing to do - with some sort of message that it couldn't gain a lock on the database.

I'm not sure I like the idea of racing to get the lock. I anticipate some issues with racing to place the .lock file. I'm fairly sure the write operation isn't atomic for all file systems. And in some instances even a mv operation isn't. We could look into asking the kernel to lock the file, though this is area of unix programming I'm not experienced in.

Alternatively, we could add a user interface to start/stop recording at user request with messaging if for some reason a lock couldn't be acquired.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants