Swirrl / ook

Structural search engine
https://search-prototype.gss-data.org.uk/
Eclipse Public License 1.0
6 stars 0 forks source link

Subject URIs cache file could be deleted before it's read #126

Closed Robsteranium closed 1 year ago

Robsteranium commented 1 year ago

There's a risk that the cache file of subject URIs could be deleted before we've finished reading from it. @callum-oakley's suggestion is to read eagerly, moving processing into the read loop. Please see #124 for the specifics.

If we see e.g. errors about trying to read from closed files then we ought to prioritise this.

callum-oakley commented 1 year ago

Turns out this isn't a problem after all because of the way unlink works. See unlink(2).

If the name was the last link to a file but any processes still have the file open the file will remain in existence until the last file descriptor referring to it is closed.