Comments (2)
Hi @blimmer. Thanks for raising this! The lock file persisting is actually expected. The existence of the file is not indicative of a lock being held. We open it and use fcntl(2)
on the fd to lock. So it must exist, but the second step must also succeed.
Unfortunately, removing it would allow a race where two instances could run at once. For example, if we have an instance waiting on the lock, then we delete the file and release the lock, the waiting instance would think it holds the lock (which it does, on a deleted file). Another instance could come along and create the file again and acquire a lock on the new one, and run concurrently. There's a similar explanation here.
I agree it is not obvious and not ideal. I believe there are ways to make deleting it possible, such as described here if we really wanted to, but I'm not sure it's necessary given the additional overhead. I'd be inclined to document it rather than anything else.
from geoipupdate-legacy.
@horgh thank you for the quick response and the helpful links. I agree with you that this confusion could be solved via documentation - I looked for some before opening this issue. I opened #80 with a proposed change to the docs.
from geoipupdate-legacy.
Related Issues (20)
- SSL connect error
- Unsafe use in CURLOPT_WRITEDATA HOT 1
- Version 2.5.0 was deleted from apt repository. HOT 7
- Question about availability HOT 1
- ASN database not installing/updating HOT 1
- 113 and 124 not included HOT 1
- geoipupdate-pureperl.pl fails to work with freebie accounts.
- Rename GeoLite2-City.mmdb.test to GeoLite2-City.mmdb failed HOT 1
- No .dat file generated (only .mmdb), but Perl Geo::IP module needing it? HOT 1
- Inconsistent references to datadir/datarootdir HOT 2
- AS number support HOT 2
- geoipupdate 2.5 not working HOT 2
- Tool does not download CSV version HOT 2
- Question About .dat File HOT 8
- Received an unexpected HTTP status code of 401 while using free GeoLite2 Databases HOT 7
- no configure file? HOT 3
- Support for the free GeoLite2 database? HOT 1
- Does this still work for legacy databases? Just started getting 401 on v2.2.1 HOT 2
- Debian repository? HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from geoipupdate-legacy.