Opened 17 months ago
Closed 17 months 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 | 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)
Change History (7)
Changed 17 months ago by Don-vip
comment:1 follow-up: ↓ 2 Changed 17 months ago by stoecker
comment:2 in reply to: ↑ 1 Changed 17 months ago by Don-vip
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 follow-up: ↓ 4 Changed 17 months ago by 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).
comment:4 in reply to: ↑ 3 ; follow-up: ↓ 5 Changed 17 months ago by Don-vip
- Owner changed from team to Don-vip
- Status changed from new to assigned
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.
comment:5 in reply to: ↑ 4 Changed 17 months ago by Don-vip
- Summary changed from [Patch needs review] Fail to update a way loaded from osmChange that have been deleted after to Fail to update a way loaded from osmChange that have been deleted after
It works :)
comment:6 Changed 17 months ago by Don-vip
- Resolution set to fixed
- Status changed from assigned to closed
In [4734/josm]:



Can you please explain what and why you do?