Ensure that peach-dyndns-server does not have race conditions #15

Open
opened 2022-01-12 15:42:14 +00:00 by notplants · 0 comments
Owner

When multiple users register a new domain simultaneously, this could create race conditions, if multiple threads are trying to append to named.conf.local at the same time.

Creating this issue to remember to work on this in the future while its on my mind.

Possible solutions:

  • see if there is a way to include a whole directory in named.conf, and then instead of appending new domains to named.conf.local, create a new independent file in the included directory, for each new registered domain
  • use some type of file lock, to ensure that only one thread is appending to named.conf.local at a time (the OS might already have something like this with the file writers we are using in rust, in which case this PR requires no further action, but I am not 100% sure and don't think so)
When multiple users register a new domain simultaneously, this could create race conditions, if multiple threads are trying to append to named.conf.local at the same time. Creating this issue to remember to work on this in the future while its on my mind. Possible solutions: - see if there is a way to include a whole directory in named.conf, and then instead of appending new domains to named.conf.local, create a new independent file in the included directory, for each new registered domain - use some type of file lock, to ensure that only one thread is appending to named.conf.local at a time (the OS might already have something like this with the file writers we are using in rust, in which case this PR requires no further action, but I am not 100% sure and don't think so)
Sign in to join this conversation.
No description provided.