Modify

Opened 13 years ago

Closed 13 years ago

#7194 closed defect (fixed)

Fail to update a way loaded from osmChange that have been deleted after

Reported by: Don-vip Owned by: Don-vip
Priority: normal Milestone:
Component: Core Version: latest
Keywords: osmChange Cc:

Description

When loading this changeset (via Ctrl-L):
http://api.openstreetmap.org/api/0.6/changeset/482681/download

This error occurs: "Deleted node referenced: {way...}".

I managed to avoid this error, but I'm not sure at all it's the best way to handle this, and I'm afraid of potential side effects, can someone take a look at my patch, please ?

Attachments (1)

7194.patch (690 bytes ) - added by Don-vip 13 years ago.

Download all attachments as: .zip

Change History (7)

by Don-vip, 13 years ago

Attachment: 7194.patch added

comment:1 by stoecker, 13 years ago

Can you please explain what and why you do?

in reply to:  1 comment:2 by Don-vip, 13 years ago

Replying to stoecker:

Can you please explain what and why you do?

Yep.

This error comes from calling setDeleted(true) on a way containing deleted nodes (because the way and at least some of its nodes have been deleted after the time of the changeset). There's a data integrity check in Way.checkNodes() that forbids that:

                if (n.isDeleted())
                    throw new DataIntegrityProblemException("Deleted node referenced: " + toString());

The question is: I'm not sure of the proper way to fix that. Is removing all the nodes safe ? Maybe just removing deleted nodes ? Maybe another obvious option I've missed ? :)

comment:3 by bastiK, 13 years ago

In DownloadOsmChangeTask, it shouldn't update the data. A changeset is the transition from one historic state to the next. Has nothing to do with the present.

Instead we should offer to load the missing data for the given date&time (load node history and use matching old version).

in reply to:  3 ; comment:4 by Don-vip, 13 years ago

Owner: changed from team to Don-vip
Status: newassigned

Replying to bastiK:

In DownloadOsmChangeTask, it shouldn't update the data. A changeset is the transition from one historic state to the next. Has nothing to do with the present.

Instead we should offer to load the missing data for the given date&time (load node history and use matching old version).

OK I'll fix that and see if the data is correctly updated with a manual update, after changeset loading.

in reply to:  4 comment:5 by Don-vip, 13 years ago

Summary: [Patch needs review] Fail to update a way loaded from osmChange that have been deleted afterFail to update a way loaded from osmChange that have been deleted after

It works :)

comment:6 by Don-vip, 13 years ago

Resolution: fixed
Status: assignedclosed

In [4734/josm]:

fix #7194 - Reworking of osmChange downloads (Fail to update a way loaded from osmChange that have been deleted after)

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Don-vip.
as The resolution will be set.
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.