Modify

Opened 12 years ago

Closed 12 years ago

#4054 closed defect (fixed)

Updating relation from API ignores locally deleted new members

Reported by: skyper Owned by: team
Priority: major Milestone:
Component: Core Version: latest
Keywords: r-2010-01-blocker Cc:

Description

Hi

Thanks for the work you doing guys !!!!

I do not know what happend, but that`s what I have done:

I have loaded the origanal file
updated from server
conflict management done
maybe some more changes
upload started

I have edited this file offline with version 2416

cu Skyper

Attachments (3)

osms_log.tar.bz2 (274.9 KB) - added by skyper 12 years ago.
2 .osm-files + console-output
wiehre_w_osm+log.tar.bz2 (504.1 KB) - added by skyper 12 years ago.
2 osm and log file
test-case-1.osm (865 bytes) - added by Gubaer 12 years ago.
Test data for simple test case , see "test script" below

Download all attachments as: .zip

Change History (19)

comment:1 Changed 12 years ago by stoecker

Owner: changed from team to skyper
Status: newneedinfo

This error only means that the server does not accept your data as it contains an logical error. Usually the error text will give you a hint what the reson is. Insert the data and complete error message, so we can help you, otherwise there is nothing we can do about this.

Changed 12 years ago by skyper

Attachment: osms_log.tar.bz2 added

2 .osm-files + console-output

comment:2 Changed 12 years ago by skyper

Owner: changed from skyper to stoecker
Status: needinfonew

comment:3 Changed 12 years ago by mjulius

Summary: upload failed: ResponseCode=412, Error Header=<Precondition failedInconsistent data when an updated relation now has previously deleted way as member

I have found one issue where JOSM is apparently misbehaving. File wiehre_o2_orig.osm contains way 4229275 which is marked for deletion and relation 68558 which does not contain way 4229275. After doing an update of relation 68558 with JOSM r2554 that relation now has way 4229275 as member which is still marked for deletion. In the relation editor this way is listed as incomplete.

This is bound to produce a conflict on upload.

comment:4 in reply to:  3 Changed 12 years ago by skyper

Replying to mjulius:

I have found one issue where JOSM is apparently misbehaving. File wiehre_o2_orig.osm contains way 4229275 which is marked for deletion and relation 68558 which does not contain way 4229275. After doing an update of relation 68558 with JOSM r2554 that relation now has way 4229275 as member which is still marked for deletion. In the relation editor this way is listed as incomplete.

This is bound to produce a conflict on upload.

yes, you are right. I stumble in this bug again !

comment:5 Changed 12 years ago by skyper

Summary: Inconsistent data when an updated relation now has previously deleted way as memberDeleting a way which is part of a relation does not update the relation

Deleting a way which is part of a relation does not update the relation (deleting this way)

version 2555

comment:6 Changed 12 years ago by mjulius

Summary: Deleting a way which is part of a relation does not update the relationUpdating relation from API ignores locally deleted new members

The issue appears when you delete a way (or a node, I guess) and then do "Update Data" and a new or updated relation has this way now as member. This results in the deleted way being member of a relation. Here is the step-by-step way to reproduce:

  • open wiehre_o2_orig.osm; this contains way 4229275 which is marked for deletion
  • select relation 68558
  • do "Update Selection"
  • when I just did that there was a conflict on that relation
  • resolve conflict using "Their" members
  • save

Now, way 4229275 is still marked for deletion and relation 68558 has it as member.

comment:7 Changed 12 years ago by Gubaer

Owner: changed from stoecker to skyper
Status: newneedinfo

I tried to reproduce, but I can't.

  • I openend the file, selected relation 68558 and did "Update selection"
  • I got a conflict, openend the conflict resolution dialog and took the relation members from "their" version

After saving to a file, I get:

  <way id='4229275' action='delete' timestamp='2009-11-08T12:28:47Z' uid='85761' user='klausis' visible='true' version='34'>
    <tag k='ref' v='B 31' />
    <tag k='highway' v='primary' />
    <tag k='name' v='Dreisamstraße' />
    <tag k='oneway' v='yes' />
    <tag k='maxspeed' v='50' />
    <tag k='lanes' v='2' />
  </way>

which is OK (this is the deleted way), and

<relation id='68558' action='modify' timestamp='2009-11-05T13:17:22Z' uid='152744' user='skyper' visible='true' version='123'>
    <member type='way' ref='37594933' role='' />
    <member type='way' ref='27648664' role='' />
    <member type='way' ref='45491975' role='' />
    <member type='way' ref='30215470' role='' />
    <member type='way' ref='45491968' role='' />
    <member type='way' ref='9982057' role='' />
    <member type='way' ref='9982012' role='' />
    <member type='way' ref='25774611' role='' />
    <member type='way' ref='10051562' role='' />
    <member type='way' ref='10051575' role='' />
    <member type='way' ref='4223083' role='' />
    <member type='way' ref='10209572' role='' />
    <member type='way' ref='23244045' role='' />
    <member type='way' ref='30642239' role='' />
    <member type='way' ref='45491972' role='' />
    <member type='way' ref='45491973' role='' />
    <member type='way' ref='4870474' role='' />
    <member type='node' ref='293811694' role='' />
    <member type='way' ref='30655308' role='' />
    <member type='way' ref='30655309' role='' />
    <member type='way' ref='30655301' role='' />
    <member type='way' ref='30655298' role='' />
    <member type='way' ref='30655300' role='' />
    <member type='way' ref='30655269' role='' />
    <member type='way' ref='30198061' role='' />
    <member type='way' ref='30665188' role='' />
    <member type='way' ref='30343822' role='' />
    <member type='way' ref='30215773' role='' />
    <member type='way' ref='27363593' role='' />
    <member type='way' ref='27363592' role='' />
    <member type='way' ref='4230447' role='' />
    <member type='way' ref='27049877' role='' />
    <member type='way' ref='4886065' role='' />
    <member type='way' ref='32277601' role='' />
    <member type='way' ref='4098601' role='' />
    <member type='way' ref='30655268' role='' />
    <member type='way' ref='43624134' role='' />
    <member type='way' ref='30655296' role='' />
    <member type='way' ref='30655307' role='' />
    <member type='way' ref='27611355' role='' />
    <member type='way' ref='32277635' role='' />
    <member type='way' ref='32277634' role='' />
    <member type='way' ref='30214847' role='' />
    <member type='way' ref='42487842' role='' />
    <member type='way' ref='27611014' role='' />
    <member type='way' ref='23226922' role='' />
    <member type='way' ref='4783427' role='' />
    <member type='way' ref='4096819' role='' />
    <member type='way' ref='4810604' role='' />
    <member type='way' ref='8025854' role='' />
    <member type='way' ref='8025855' role='' />
    <member type='way' ref='8025856' role='' />
    <member type='way' ref='9507266' role='' />
    <member type='way' ref='9510857' role='' />
    <member type='way' ref='9546707' role='' />
    <member type='way' ref='9648862' role='' />
    <member type='way' ref='9980312' role='' />
    <member type='way' ref='9980464' role='' />
    <member type='way' ref='39243920' role='' />
    <member type='way' ref='38714395' role='' />
    <member type='way' ref='10041726' role='' />
    <member type='way' ref='10041902' role='' />
    <member type='way' ref='10042282' role='' />
    <member type='way' ref='23635427' role='' />
    <member type='way' ref='23635988' role='' />
    <member type='way' ref='23672722' role='' />
    <member type='way' ref='23672727' role='' />
    <member type='way' ref='23705958' role='' />
    <member type='way' ref='23705959' role='' />
    <member type='way' ref='23712245' role='' />
    <member type='way' ref='23843048' role='' />
    <member type='way' ref='24375288' role='' />
    <member type='way' ref='24375289' role='' />
    <member type='way' ref='24375294' role='' />
    <member type='way' ref='24375296' role='' />
    <member type='way' ref='24375302' role='' />
    <member type='way' ref='24765652' role='' />
    <member type='way' ref='24765655' role='' />
    <member type='way' ref='24983612' role='' />
    <member type='way' ref='25774610' role='' />
    <member type='way' ref='25774618' role='' />
    <member type='way' ref='25774619' role='' />
    <member type='way' ref='26805699' role='' />
    <member type='way' ref='26805700' role='' />
    <member type='way' ref='26806299' role='' />
    <member type='way' ref='39886500' role='' />
    <member type='way' ref='27124231' role='' />
    <member type='way' ref='27124232' role='' />
    <member type='way' ref='27641012' role='' />
    <member type='way' ref='27683952' role='' />
    <member type='way' ref='28402613' role='' />
    <member type='way' ref='28402614' role='' />
    <member type='way' ref='28436769' role='' />
    <member type='way' ref='28436770' role='' />
    <member type='way' ref='28436802' role='' />
    <member type='way' ref='29339364' role='' />
    <member type='way' ref='29339365' role='' />
    <member type='way' ref='29390383' role='' />
    <member type='way' ref='30216135' role='' />
    <member type='way' ref='30216156' role='' />
    <member type='way' ref='30216164' role='' />
    <member type='way' ref='30267442' role='' />
    <member type='way' ref='30267731' role='' />
    <member type='way' ref='30267733' role='' />
    <member type='way' ref='30267778' role='' />
    <member type='way' ref='30267811' role='' />
    <member type='way' ref='30439127' role='' />
    <member type='way' ref='30439149' role='' />
    <member type='way' ref='30440445' role='' />
    <member type='way' ref='30713169' role='' />
    <member type='way' ref='31488519' role='' />
    <member type='node' ref='309147560' role='' />
    <member type='node' ref='381935139' role='' />
    <member type='node' ref='312429343' role='' />
    <member type='way' ref='33506059' role='' />
    <member type='node' ref='29847041' role='' />
    <member type='way' ref='33506086' role='' />
    <member type='node' ref='303439335' role='' />
    <member type='node' ref='303439337' role='' />
    <member type='node' ref='303439331' role='' />
    <member type='node' ref='303439333' role='' />
    <member type='node' ref='303439351' role='' />
    <member type='node' ref='303439353' role='' />
    <member type='node' ref='369559093' role='' />
    <member type='node' ref='392873212' role='' />
    <member type='way' ref='36926374' role='' />
    <member type='way' ref='36926434' role='' />
    <member type='node' ref='25237964' role='stop' />
    <member type='way' ref='41570079' role='' />
    <member type='node' ref='303436376' role='' />
    <member type='node' ref='497492797' role='' />
    <member type='node' ref='497492696' role='' />
    <member type='way' ref='30453385' role='' />
    <member type='node' ref='510810418' role='' />
    <member type='way' ref='43557097' role='' />
    <member type='way' ref='43557098' role='' />
    <member type='way' ref='43557099' role='' />
    <member type='way' ref='43557100' role='' />
    <member type='node' ref='507039988' role='stop' />
    <member type='way' ref='44172252' role='' />
    <tag k='ref' v='7215' />
    <tag k='route' v='bus' />
    <tag k='type' v='route' />
    <tag k='operator' v='Südbadenbus GmbH' />
    <tag k='network' v='RVF' />
  </relation>

which is OK too, because it doesn't refer to 4229275.

I also dumped the list of members after merging and relation 68558 doesn't include deleted or invisible members.

Can you still reproduce the defect? Anything else I can do to reproduce it?

comment:8 Changed 12 years ago by mjulius

Hmmm, I can't reproduce it anymore neither. This is strange. Or am I going nuts?

I actually don't think it is OK that JOSM silently drops members from downloaded relations (or nodes from downloaded ways) that have been deleted locally. IMHO this should produce at least a warning.

comment:9 Changed 12 years ago by skyper

Owner: changed from skyper to team
Status: needinfonew

I also cannot reproduce it.
I have to say I have uploaded this osm-file with version 2255, so the data should be already on the server or edited meanwhile.

When the bug appeared I had previous deleted overlapping ways with relations.
I noticed that deleting a way which is member of a relation finally deletes its membership also which did not happen with version 255?.

comment:10 Changed 12 years ago by skyper

Uploading another osm I can narrow the problem:

  1. You have to conficts (one regarding the way an another one regarding a relation)
  2. I resolve the way conflict deleting the way cause this was one of my changes!!
  3. the way is not delete in the relation-conflict, so you still think it is part of the relation and solving the second conflict (using their members and a few of my own) leads to the error

comment:11 in reply to:  10 Changed 12 years ago by skyper

Replying to skyper:

Uploading another osm I can narrow the problem:

  1. You have to conficts (one regarding the way an another one regarding a relation)

sorry, 2 conficts

comment:12 Changed 12 years ago by skyper

it happend again and I cannot find that way in my relation !!!

Changed 12 years ago by skyper

Attachment: wiehre_w_osm+log.tar.bz2 added

2 osm and log file

comment:13 Changed 12 years ago by Gubaer

Keywords: r-2010-01-blocker added

comment:14 Changed 12 years ago by Gubaer

(In [2983]) see #4054: Improving user feedback when trying to merge a deleted relation member.

Changed 12 years ago by Gubaer

Attachment: test-case-1.osm added

Test data for simple test case , see "test script" below

comment:15 Changed 12 years ago by Gubaer

Here's a small test case and a "test script" trying to reproduce the problem. This script is an attempt to reproduce what skyper describes here.

  • Launch another JOSM instance JOSM-2. Download the data. Update the tag version way.1 to 2. Update the tag version of relation.1 to 2. Upload the data.
  • Switch back to JOSM-1. Delete way.1. Update the tag version of relation.1 to 3. Run "Update Data" Two conflicts are generated.
  • Open the conflict for way.1. Decide to keep the "my deleted state" and close the dialog.
  • Open the conflict for relation.1.
    • Resolve the tag conflict (doesn't matter how)
    • Try to keep the member for way.1 in "their" version. JOSM.1 will refuse to merge it because it is deleted in the target dataset (aka "my dataset").
    • Click on "Freeze" which will keep the the relation without members
    • Close the dialog
  • Upload the data.

Result:

  • Everything is fine with this example.

comment:16 Changed 12 years ago by Gubaer

Resolution: fixed
Status: newclosed

I think there was a major improvement by jttt in r2949. Since r2949 it's not possible anymore to merge deleted members of a relation to a target relation.

It is very likely that this solved the problem reported here (see also my "test script").

Closing as fixed. Please reopen if this happens again and try to supply a small test data set and a step-by-step script to reproduce the problem.

Modify Ticket

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

Add Comment


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

 
Note: See TracTickets for help on using tickets.