Modify

Opened 7 weeks ago

Last modified 21 hours ago

#15374 reopened defect

problem deleting multilevel relations

Reported by: aceman Owned by: team
Priority: normal Milestone: 17.10
Component: Core Version: latest
Keywords: relation upload Cc:

Description

I had some problems uploading a changeset deleting multiple relations that were ordered in a tree.

I wanted to delete relation 1832956, that had relation 1832955 as a member which I wanted to delete too. 1832956 itself was a member of another relation, that was NOT to be deleted.

I deleted both 1832955 and 1832956 (the parent was loaded too) in one changeset and wanted to upload. I got the error:
SEVERE: org.openstreetmap.josm.io.OsmApiException: ResponseCode=412, Error Header=<Precondition failed: The relation 1832955 is used in relation 1832956.>
org.openstreetmap.josm.io.OsmApiException: ResponseCode=412, Error Header=<Precondition failed: The relation 1832955 is used in relation 1832956.>

The solution I came to was just delete 1832955, upload it, then delete 1832956 and upload again.

Attachments (0)

Change History (17)

comment:1 Changed 7 weeks ago by GerdP

Got a similar problem a few days ago. Someone created a multipolygon-rel containing a single node and another mp-rel containing only this rel. This happened a few times in a small area. I removed both rels and fixed a lot of other problems like unconnected roads and later got similar problems. I had to remove quite a lot of rels and update before OSM accepted the larger changeset.

comment:2 Changed 7 weeks ago by Don-vip

Keywords: relation upload added

comment:3 Changed 7 weeks ago by stoecker

That issue should be reported to the OsmApi instead of JOSM. It's clearly an API error to reject a changeset which leaves a consistent state.

comment:4 Changed 7 weeks ago by aceman

Or JOSM could reorder the deletion commands to the order the API would accept. I remember there was such an error in the past.

comment:5 in reply to:  4 Changed 7 weeks ago by stoecker

Replying to aceman:

Or JOSM could reorder the deletion commands to the order the API would accept. I remember there was such an error in the past.

That's a workaround instead of a bugfix.

comment:6 in reply to:  4 ; Changed 6 weeks ago by bastiK

Replying to aceman:

Or JOSM could reorder the deletion commands to the order the API would accept. I remember there was such an error in the past.

JOSM does so already (see class RelationUploadDependencyGraph). If it does so incorrectly, then this is a regression and must be fixed. If not, this is quite clearly an problem of the OSM API and probably a regression as well.

comment:7 Changed 5 weeks ago by bastiK

Resolution: fixed
Status: newclosed

In 13018/josm:

fixed #15374 - problem deleting multilevel relations

comment:8 in reply to:  6 Changed 5 weeks ago by bastiK

Replying to bastiK:

JOSM does so already (see class RelationUploadDependencyGraph).

It did sort the deleted relations, but exactly the wrong way around.

comment:9 Changed 5 weeks ago by bastiK

Milestone: 17.10

comment:10 Changed 5 weeks ago by bastiK

In 13020/josm:

see #15374 - update unit test

comment:11 Changed 5 weeks ago by bastiK

This ticket is a duplicate of #9624, which was closed by [6776]. As can be seen from the unit test, it was never actually fixed. Just odd that the problem was not reported in the 4 years since then.

comment:12 Changed 5 weeks ago by GerdP

Yes, sounds strange. Maybe the reason is that you typically don't have the situation that one wants to delete both the parent and child relation. In my case I assume that an unexperienced mapper pressed Ctrl+B (Create Mulitpolygon) multiple times.

comment:13 Changed 8 days ago by aceman

I now again have a case of multiple relations to be deleted in real OSM data. Would you guys like to try the fix on it, or should I do it using latest JOSM?

comment:14 Changed 7 days ago by bastiK

Please go ahead and let us know in case there are problems!

comment:15 Changed 7 days ago by aceman

Resolution: fixed
Status: closedreopened

Unfortunately it still doesn't work.
Try to remove relations 7201335 (bus line ref=97), 7201336, 7201337 (their parent).
When uploading, I get server message that 7201335 is still referenced from 7201337. So it seems JOSM still tries to delete 7201335 before 7201337. Also notice 7201337 is a member of 3305365 from which it needs to be removed too.

Trying with JOSM 13115.

comment:16 Changed 7 days ago by bastiK

Confirmed. It appears, the information about former members is currently cleared when a relation is deleted. This makes it impossible to trace the dependencies on upload.

comment:17 Changed 21 hours ago by Zverikk

The issue hasn't been solved, as it seems. A few hours ago another mapper from russia telegram said he's got conflicts after deleting two nested relations.

Is it hard to not delete member list until the changes are uploaded?

Last edited 21 hours ago by Zverikk (previous) (diff)

Modify Ticket

Change Properties
Set your email in Preferences
Action
as reopened The owner will remain team.
as The resolution will be set.
to The owner will be changed from team to the specified user.
The owner will change to aceman
as duplicate The resolution will be set to duplicate.The specified ticket will be cross-referenced with this ticket

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.