In message <[EMAIL PROTECTED]> Martijn van Oosterhout <[EMAIL PROTECTED]> wrote:
> Secondly, prevention is better than cure. It would be worthwhile going > over all the code that accesses the server database and determine if > it is "safe". The lack of transactions makes it more difficult, but > the idea is that prior to deleting a node you check that it's not > used, after locking it. And more importantly, *after* you've deleted > it, check again. That still has race conditions unless you can do the check in an atomic fashion, which I'm not sure you can. > Alternatively, when adding/updating a way, lock the component nodes > prior to doing the update so they can't get deleted in the meantime. Well obviously we could just lock everything, but the users of the API probably wouldn't like the result much. > There are many methods and complete books written on the topic. Choose > whichever you like best, but it's certainly a problem that needs to be > solved. I know that. They probably generally start from the assumption that you have a vaguely ACID compliant database engine though. Tom -- Tom Hughes ([EMAIL PROTECTED]) http://www.compton.nu/ _______________________________________________ dev mailing list dev@openstreetmap.org http://lists.openstreetmap.org/cgi-bin/mailman/listinfo/dev