Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upstream (OSM) user name changes aren't reflected in results #257

Closed
mojodna opened this issue Mar 13, 2016 · 3 comments
Closed

Upstream (OSM) user name changes aren't reflected in results #257

mojodna opened this issue Mar 13, 2016 · 3 comments

Comments

@mojodna
Copy link

mojodna commented Mar 13, 2016

This is likely difficult to address in Overpass directly (it's probably related to diff contents), but here goes:

  1. A user creates an account on OSM.org with the name "ImAUser". Her user ID is, say, 12.
  2. Edits are made.
  3. Diffs are transmitted to Overpass.
  4. ImAUser later changes her name to "ImReallyAUser".
  5. She (or someone else) comes along and re-registers the name "ImAUser" (because it's available) and is assigned user ID 76.
  6. User 76 makes edits.
  7. Diffs are transmitted to Overpass.

We're encountering this in practice within this bbox: [-80.259418, -3.515306, -80.184231, -3.447453] where the user "Nodes&Roads" appears in the results with 2 separate user IDs (3642735 and 1708958). According to OSM.org, 1708958 is now known as "georhoko", but this has not propagated to Overpass (presumably due to the use of diff updates which do not relay name changes).

We spotted this using Osmosis to create an API DB of the above extract. The Osmosis error is:

org.openstreetmap.osmosis.core.OsmosisRuntimeException: Unable to insert user with id 1708958 into the database.
Caused by: org.postgresql.util.PSQLException: ERROR: duplicate key value violates unique constraint "users_display_name_idx"
  Detail: Key (display_name)=(Nodes&Roads) already exists.

/cc @hallahan

@mmd-osm
Copy link
Contributor

mmd-osm commented Mar 13, 2016

I think, there's one important point missing in your example, right after step 4: does user id 12 do further edits after renaming his user to "ImReallyAUser". Only then, this new name would show up in the diff files and Overpass would also update the uid -> username link.

Changing the username on osm.org alone without further edits will never appear in a diff file (!), hence it is technically impossible for Overpass API to reflect that change. So your statement "(presumably due to the use of diff updates which do not relay name changes)" is exactly to the point.

The only reliable means to identify a user in the OSM universe is really the uid. For your queries you could use (uid:3642735) instead of a user name. The username can change over time and it is not guaranteed that another user cannot re-use an old and no longer used user name.

There's one exception though: as the Overpass DB was set up with the first ODbL compliant planet file in September 2012 (and subsequent diffs), any previous user change would be reflected. That's because the Planet extraction has access to the main DB and therefore can use the current user names at the time of creating that planet file. In general: if you create your own Overpass DB with a current planet file, you should get the user names as they are at the time of creating that planet.

So bottom line: it's a diff design issue, which cannot really solved by Overpass API.

BTW: this affects a lot of other tools as well and is mainly a problem of the diff mechanism. Maybe create an upstream issue for this?

@mmd-osm
Copy link
Contributor

mmd-osm commented Apr 2, 2017

@mojodna : unless you've created some upstream issue to address the underlying issue, I'd suggest to close this issue. As mentioned before, there's nothing which could be done on the Overpass API side as long as the diff files don't include the respective information.

@mojodna
Copy link
Author

mojodna commented Apr 3, 2017

Agreed. Closing.

@mojodna mojodna closed this as completed Apr 3, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants