Skip to content
This repository has been archived by the owner on Jul 24, 2021. It is now read-only.

500 on uploading relation with duplicate members #718

Closed
openstreetmap-trac opened this issue Jul 23, 2021 · 4 comments
Closed

500 on uploading relation with duplicate members #718

openstreetmap-trac opened this issue Jul 23, 2021 · 4 comments

Comments

@openstreetmap-trac
Copy link

Reporter: robx
[Submitted to the original trac issue database at 4.18pm, Friday, 29th February 2008]

JOSM allows creating relations with duplicate members (bug filed there). The upload to OSM fails with 500, which is supposedly an error in the server, hence my report.

Concretely, I created a route relation with a duplicate way of role="".

@openstreetmap-trac
Copy link
Author

Author: grand.edgemaster[at]gmail.com
[Added to the original trac issue at 4.41pm, Thursday, 13th March 2008]

I came across this bug again last night, it also appears that the API adds a new blank relation on each 500 error encountered.

@openstreetmap-trac
Copy link
Author

Author: shaunmcdonald131[at]gmail.com
[Added to the original trac issue at 1.24pm, Tuesday, 20th May 2008]

The issue appears to be that an index is being violated, thus MySQL is rolling back.

Here is the last part of the trace in my local setup:

[2008-05-20 14:09:28.573877 #2105] RelationMember Delete all (0.000437) DELETE FROM current_relation_members WHERE (id = 1)
[2008-05-20 14:09:28.575965 #2105] RelationMember Columns (0.001801) SHOW FIELDS FROM current_relation_members
[2008-05-20 14:09:28.578431 #2105] RelationMember Create (0.000323) INSERT INTO current_relation_members (member_type, member_id, id, member_role) VALUES('way', 6, 1, '')
[2008-05-20 14:09:28.579880 #2105] RelationMember Create (0.000000) Mysql::Error: Duplicate entry '1-way-6-' for key 1: INSERT INTO current_relation_members (member_type, member_id, id, member_role) VALUES('way', 6, 1, '')
[2008-05-20 14:09:28.581210 #2105] SQL (0.000686) ROLLBACK
[2008-05-20 14:09:28.581798 #2105] Completed in 0.24997 (4 reqs/sec) | Rendering: 0.00010 (0%) | DB: 0.13949 (55%) | 500 Internal Server Error [http://localhost/api/0.5/relation/1]

@openstreetmap-trac
Copy link
Author

Author: shaunmcdonald131[at]gmail.com
[Added to the original trac issue at 1.25pm, Tuesday, 20th May 2008]

interestingly the log doesn't keep the port number in the log.

@openstreetmap-trac
Copy link
Author

Author: smsm1
[Added to the original trac issue at 3.25pm, Tuesday, 20th May 2008]

(In [7869]) Add a check to make sure that a node/way/relation doesn't already exist in the relation as part of the preconditions. closes #718

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant