On Tue, Jul 22, 2008 at 10:18 AM, Stefan Baebler
<[EMAIL PROTECTED]> wrote:
> Tnx for the confirmation.
> I guess 0.6 API aims to fix that with atomic uploads, but Potlatch
> will remain using its own "API", right? Is it now (version 0.10)
> preventing this somehow?

Well, it's API will get upgraded to use transactions and optimistic
locking along with everything else.
The 0.10 changes just regularise the code to use more rails and less
SQL (or at least make that an option).

>
> so the events went something like:
> - user adjusts the way somehow [common operation]
> - potlatch decides to delete old way and create a new one for some
> reason [stupid (breaking history), but legal]
> - potlatch deletes old way and all the nodes it can (those that aren't
> used by other ways where other rivers join the riverbank) [stupid, but
> ok]
> - potlatch creates a new way, consisting of old (now mostly deleted)
> nodes [illegal]
>
> Not really sure this has anything to do with missing transactions,
> more likely some bad logic. Foreign keys in the db on current_ways ->
> current_nodes could prevent that, but AFAIK they aren't used for
> performance reasons.

It's almost certainly to do with transactions... or at least lack of
any locking. There's very little you can do at the moment if requests
don't get executed in the order which they are sent. And that can
happen as there are multiple rails boxes/threads/processes dealing
with requests. API 0.6 introduces optimistic locking which should
cause these situations to generate errors rather than corrupt things.


>
> But why is potlatch today STILL showing the riverbank as it would be
> there, but in fact it isn't?

For the same reason the history call to the API still shows it. The
potlatch API works slightly differently to the normal API, and in this
case it doesn't check for the visibility of the nodes before returning
them. It assumes that if it's in a visible way then the node is
visible, which unfortunately isn't now true.

If you edit the way in potlatch it should actually resurrect the nodes
and make everything consistent again -- I did this just now, and it
now seems fine (hopefully :-)).

Dave

_______________________________________________
dev mailing list
dev@openstreetmap.org
http://lists.openstreetmap.org/cgi-bin/mailman/listinfo/dev

Reply via email to