Open thisisaaronland opened 6 years ago
Also: http://tile38.com/commands/del/
tile38-cli
127.0.0.1:9851> GET whosonfirst 1142028949#whosonfirst-data-venue-kr
{"ok":true,"object":{"type":"Point","coordinates":[121.45946388889,25.142794444444]},"elapsed":"55.912µs"}
127.0.0.1:9851> GET whosonfirst 1142028949#whosonfirst-data-venue-tw
{"ok":true,"object":{"type":"Point","coordinates":[121.459464,25.142794]},"elapsed":"37.748µs"}
127.0.0.1:9851> DEL whosonfirst 1142028949#whosonfirst-data-venue-kr
{"ok":true,"elapsed":"48.121µs"}
127.0.0.1:9851> GET whosonfirst 1142028949#whosonfirst-data-venue-tw
{"ok":true,"object":{"type":"Point","coordinates":[121.459464,25.142794]},"elapsed":"46.291µs"}
127.0.0.1:9851> GET whosonfirst 1142028949#whosonfirst-data-venue-kr
(error) id not found
ID
1142028949
was accidentally added to the wrong repo (venue-kr) and subsequently moved to the correct repo (venue-tw) but was indexed twice in T38.Because we use compound
{WOFID}#{REPO}
keys for indexing geometries T38 didn't think anything of it and the problem rippled down to the API as follows:There is code to de-dupe WOF IDs in the API now but we should figure out how to be more smarter at this layer to prevent the problem from happening at all. Maybe a separate ID -> repo index?