Modify

Opened 2 years ago

Closed 6 months ago

Last modified 6 months ago

#11010 closed defect (fixed)

Wrong order of objects uploaded

Reported by: skyper Owned by: team
Priority: normal Milestone: 16.10
Component: Core Version: latest
Keywords: template_report upload order Cc: naoliv

Description

What steps will reproduce the problem?

  1. Tried to upload a partial revert with undeleted nodes and ways some being part of a relation

What is the expected result?

Upload works fine in one step

What happens instead?

org.openstreetmap.josm.io.OsmApiException: ResponseCode=412, Error Header=<Precondition failed

Please provide any additional information below. Attach a screenshot if possible.

Problem is that JOSM tries to upload the relations before uploading (undeleting) the ways. Same happens if you only try to upload only ways and nodes. Ways before nodes does not work.

Conclusion, I had to do the job for the software by first uploading nodes, then ways and last relations.

Please find attached file to reproduce but do not upload.

Repository Root: http://josm.openstreetmap.de/svn
Build-Date: 2015-01-22 02:34:20
Last Changed Author: Klumbumbus
Revision: 7978
Repository UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
Relative URL: ^/trunk
URL: http://josm.openstreetmap.de/svn/trunk
Last Changed Date: 2015-01-22 01:10:40 +0100 (Thu, 22 Jan 2015)
Last Changed Rev: 7978

Identification: JOSM/1.5 (7978 en) Linux Debian GNU/Linux 7.8 (wheezy)
Memory Usage: 386 MB / 882 MB (60 MB allocated, but free)
Java version: 1.7.0_65, Oracle Corporation, OpenJDK 64-Bit Server VM
Java package: openjdk-7-jre:amd64-7u71-2.5.3-2~deb7u1
Dataset consistency test: No problems found

Plugins:
- OpeningHoursEditor (30892)
- conflation (0.1.7)
- download_along (30892)
- imagery-xml-bounds (30892)
- imagery_offset_db (30892)
- jts (30892)
- mirrored_download (30892)
- photoadjust (30905)
- reverter (30892)
- terracer (30892)
- todo (29154)
- undelete (30892)
- utilsplugin2 (30892)
- waydownloader (30892)
- wikipedia (30892)

Last errors/warnings:
- E: org.openstreetmap.josm.io.OsmApiException: ResponseCode=412, Error Header=<Precondition failed: Way 30324968 requires the nodes with id in (3115855346), which either do not exist, or are not visible.>
- W: java.io.IOException: Server returned HTTP response code: 412 for URL: https://api.openstreetmap.org/api/0.6/changeset/28340555/upload. Cause: java.io.IOException: Server returned HTTP response code: 412 for URL: https://api.openstreetmap.org/api/0.6/changeset/28340555/upload
- E: Error header: Precondition failed: Relation with id 1080376 cannot be saved due to Way with id 30324968
- W: Error header "Precondition failed: Relation with id 1080376 cannot be saved due to Way with id 30324968" did not match with an expected pattern
- E: org.openstreetmap.josm.io.OsmApiException: ResponseCode=412, Error Header=<Precondition failed: Relation with id 1080376 cannot be saved due to Way with id 30324968>

Attachments (1)

partial_revert.osm (496.7 KB) - added by skyper 2 years ago.
osm example file

Download all attachments as: .zip

Change History (9)

Changed 2 years ago by skyper

Attachment: partial_revert.osm added

osm example file

comment:1 Changed 2 years ago by skyper

Happened again see my comment on #5619.

comment:2 Changed 6 months ago by skyper

Ticket #9167 has been marked as a duplicate of this ticket.

comment:3 Changed 6 months ago by skyper

Cc: naoliv added

Still no fun to upload undeleted objects. Is it really that difficult to order the upload:

  • first existing nodes
  • than existing ways
  • than all modified relations
  • than deleted ways
  • last deleted nodes

Thanks

comment:4 Changed 6 months ago by simon04

Resolution: fixed
Status: newclosed

In 11176/josm:

fix #11010 - Wrong order of objects uploaded

Now the uploaded objects are sorted as follows:

  • added nodes
  • added ways
  • added relations
  • modified nodes
  • modified ways
  • modified relations
  • deleted relations
  • deleted ways
  • deleted nodes

comment:5 Changed 6 months ago by Klumbumbus

Milestone: 16.10

comment:6 in reply to:  4 ; Changed 6 months ago by skyper

Replying to simon04:

Now the uploaded objects are sorted as follows:

  • added nodes
  • added ways
  • added relations
  • modified nodes
  • modified ways
  • modified relations
  • deleted relations
  • deleted ways
  • deleted nodes

No need to separate added and modified but it should work.

comment:7 in reply to:  6 Changed 6 months ago by simon04

Replying to skyper:

No need to separate added and modified but it should work.

The separation is used for conflict checking.

comment:8 in reply to:  6 Changed 6 months ago by skyper

Replying to skyper:

No need to separate added and modified but it should work.

Sorry, you did the right thing. Did not think about nested relations.

Last edited 6 months ago by skyper (previous) (diff)

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain team.
as The resolution will be set. Next status will be 'closed'.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


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

 
Note: See TracTickets for help on using tickets.