[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-bugs] #16296 [Onionoo]: Implement lock file in a more robust way
#16296: Implement lock file in a more robust way
---------------------+---------------------
Reporter: karsten | Owner:
Type: defect | Status: new
Priority: normal | Milestone:
Component: Onionoo | Version:
Keywords: | Actual Points:
Parent ID: | Points:
---------------------+---------------------
The current lock file gets written when the hourly updater starts and gets
deleted when it exits. It's really good in preventing concurrent
executions. But it doesn't handle cases when a process doesn't exit
cleanly, because subsequent executions won't start at all. One
possibility for not exiting cleanly is that the machine gets rebooted
while the hourly updater is running.
One way to fix this might be to use
[http://docs.oracle.com/javase/7/docs/api/java/nio/channels/FileLock.html
Java's FileLock] instead of making up our own lock file.
This is more a defect than an enhancement, because it broke the main
Onionoo service instance.
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/16296>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
_______________________________________________
tor-bugs mailing list
tor-bugs@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs