[OSM-dev] relations refering to deleted objects

Matt Amos zerebubuth at gmail.com
Sun May 23 19:50:13 BST 2010


On Sun, May 23, 2010 at 6:28 PM, Frederik Ramm <frederik at remote.org> wrote:
> Mitja Kleider wrote:
>> Shouldn't the API reject a changeset creating such inconsistencies?
>
> It should. I haven't looked at your list but be aware that (contrary to
> what some people think) the planet dump does NOT possess referential
> integrity.

this should no longer be the case. recent planets (i can't remember
exactly when it changed) should be dumped with full integrity, so any
examples of inconsistencies that you find in the planet should also be
in the database. if they're not that's a bug in the dump process i'd
like to know about, please. :-)

as for the inconsistencies in the database, some pre-date API 0.6 and,
although efforts were made to clean it up when we migrated we
obviously missed some. there were also some created since then,
presumably due to bugs in the API. i'd be very interested if anyone
can find a reproducible way of creating these errors (on api06.dev,
please). my hunch is that it's something to do with concurrent editing
and insufficient locking, but i've never been able to pin it down.

the ultimate solution is to have the database enforce this referential
integrity, but that's a big enough change it'll have to wait until
0.7. in any case, these problems are (should be?) much, much rarer
than they were under 0.5, and if you encounter one please fix it by
removing deleted nodes from the ways that reference them or deleted
members from relations that reference them.

cheers,

matt




More information about the dev mailing list