{"action":"created","comment":{"url":"https://api.github.com/repos/Project-OSRM/osrm-backend/pulls/comments/46021631","id":46021631,"diff_hunk":"@@ -38,32 +38,32 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n \n struct QueryNode\n {\n-    using key_type = NodeID; // type of NodeID\n+    using key_type = NodeID64; // type of NodeID\n     using value_type = int;  // type of lat,lons\n \n-    explicit QueryNode(int lat, int lon, NodeID node_id) : lat(lat), lon(lon), node_id(node_id) {}\n+    explicit QueryNode(int lat, int lon, NodeID64 node_id) : lat(lat), lon(lon), node_id(node_id) {}\n     QueryNode()\n         : lat(std::numeric_limits<int>::max()), lon(std::numeric_limits<int>::max()),\n-          node_id(std::numeric_limits<unsigned>::max())\n+          node_id(INVALID_NODEID64)\n     {\n     }\n \n     int lat;\n     int lon;\n-    NodeID node_id;\n+    NodeID64 node_id;\n \n     static QueryNode min_value()\n     {\n         return QueryNode(static_cast<int>(-90 * COORDINATE_PRECISION),\n                          static_cast<int>(-180 * COORDINATE_PRECISION),\n-                         std::numeric_limits<NodeID>::min());\n+                         NodeID64(0));\n     }\n \n     static QueryNode max_value()\n     {\n         return QueryNode(static_cast<int>(90 * COORDINATE_PRECISION),\n                          static_cast<int>(180 * COORDINATE_PRECISION),\n-                         std::numeric_limits<NodeID>::max());\n+                         INVALID_NODEID64);","path":"data_structures/query_node.hpp","position":35,"original_position":35,"commit_id":"e3367ec718049e2de974b0afc1a9286d8355cbd4","original_commit_id":"e3367ec718049e2de974b0afc1a9286d8355cbd4","user":{"login":"MoKob","id":12932279,"avatar_url":"https://avatars.githubusercontent.com/u/12932279?v=3","gravatar_id":"","url":"https://api.github.com/users/MoKob","html_url":"https://github.com/MoKob","followers_url":"https://api.github.com/users/MoKob/followers","following_url":"https://api.github.com/users/MoKob/following{/other_user}","gists_url":"https://api.github.com/users/MoKob/gists{/gist_id}","starred_url":"https://api.github.com/users/MoKob/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MoKob/subscriptions","organizations_url":"https://api.github.com/users/MoKob/orgs","repos_url":"https://api.github.com/users/MoKob/repos","events_url":"https://api.github.com/users/MoKob/events{/privacy}","received_events_url":"https://api.github.com/users/MoKob/received_events","type":"User","site_admin":false},"body":"see above","created_at":"2015-11-27T07:18:15Z","updated_at":"2015-11-27T07:18:15Z","html_url":"https://github.com/Project-OSRM/osrm-backend/pull/1793#discussion_r46021631","pull_request_url":"https://api.github.com/repos/Project-OSRM/osrm-backend/pulls/1793","_links":{"self":{"href":"https://api.github.com/repos/Project-OSRM/osrm-backend/pulls/comments/46021631"},"html":{"href":"https://github.com/Project-OSRM/osrm-backend/pull/1793#discussion_r46021631"},"pull_request":{"href":"https://api.github.com/repos/Project-OSRM/osrm-backend/pulls/1793"}}},"pull_request":{"url":"https://api.github.com/repos/Project-OSRM/osrm-backend/pulls/1793","id":51944361,"html_url":"https://github.com/Project-OSRM/osrm-backend/pull/1793","diff_url":"https://github.com/Project-OSRM/osrm-backend/pull/1793.diff","patch_url":"https://github.com/Project-OSRM/osrm-backend/pull/1793.patch","issue_url":"https://api.github.com/repos/Project-OSRM/osrm-backend/issues/1793","number":1793,"state":"open","locked":false,"title":"[not ready] Support for 64bit OSM node identifiers","user":{"login":"danpat","id":1892250,"avatar_url":"https://avatars.githubusercontent.com/u/1892250?v=3","gravatar_id":"","url":"https://api.github.com/users/danpat","html_url":"https://github.com/danpat","followers_url":"https://api.github.com/users/danpat/followers","following_url":"https://api.github.com/users/danpat/following{/other_user}","gists_url":"https://api.github.com/users/danpat/gists{/gist_id}","starred_url":"https://api.github.com/users/danpat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danpat/subscriptions","organizations_url":"https://api.github.com/users/danpat/orgs","repos_url":"https://api.github.com/users/danpat/repos","events_url":"https://api.github.com/users/danpat/events{/privacy}","received_events_url":"https://api.github.com/users/danpat/received_events","type":"User","site_admin":false},"body":"This PR is to address https://github.com/Project-OSRM/osrm-backend/issues/322\r\n\r\nIt adds support for 64bit OSM node id values.  Without this change, OSM id values greater than 2^32 will overflow, and potentially conflict with other values.  I.e. currently, OSRM sees 4294967296 as the same as 1.  We expect to hit the unsigned 2^32 ceiling in the next few months.\r\n\r\nThis adds some overhead during processing: we need extra space to store the 64bit identifiers.  The main increases are:\r\n\r\n  - during `osrm-extract`, the `all_nodes_list` and `used_nodes_list` will double in size.  These are both STXXL vectors, so the main impact will be on disk space and I/O during sorting.\r\n\r\n  - the same applies for turn restrictions - we will now hold 64bit IDs in memory instead of 32bit IDs until we can re-number the identifiers.\r\n\r\nRun-time memory performance for `osrm-routed` and `osrm-prepare` should be relatively unchanged.  By this stage of the pipeline, we are using mostly internal 32bit identifiers.  There will be some additional I/O when loading the `.nodes` file, because it contains the original OSM 64bit IDs (this file will double in size), but this cost should be relatively small.\r\n\r\nStill TODO:\r\n\r\n - [ ] 64bit ID test - I have manually constructed a test file that demonstrates the conflicting IDs, but I still need to integrate it into the test suite.\r\n\r\nBecause of the ubiquitous use of the `NodeID` type, I implemented a strictly typed (based on `BOOST_STRICT_TYPEDEF`) `NodeID64` which does not allow automatic type conversion.  This should help avoid any type confusion in the future, as we'll get compiler errors if someone tries to assign a NodeID to a NodeID64, or vice-versa.  At least with GCC4.9 and `clang` from XCode 7 on OSX, the strict typedef object is fully optimized away under `-O3`, so it incurs no runtime overhead for production systems.","created_at":"2015-11-26T20:33:28Z","updated_at":"2015-11-27T07:18:15Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9239dfde9db4e40d50690f4d52adc6b542cf6563","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/Project-OSRM/osrm-backend/pulls/1793/commits","review_comments_url":"https://api.github.com/repos/Project-OSRM/osrm-backend/pulls/1793/comments","review_comment_url":"https://api.github.com/repos/Project-OSRM/osrm-backend/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Project-OSRM/osrm-backend/issues/1793/comments","statuses_url":"https://api.github.com/repos/Project-OSRM/osrm-backend/statuses/e3367ec718049e2de974b0afc1a9286d8355cbd4","head":{"label":"Project-OSRM:fix/64bit_osm_ids","ref":"fix/64bit_osm_ids","sha":"e3367ec718049e2de974b0afc1a9286d8355cbd4","user":{"login":"Project-OSRM","id":8207060,"avatar_url":"https://avatars.githubusercontent.com/u/8207060?v=3","gravatar_id":"","url":"https://api.github.com/users/Project-OSRM","html_url":"https://github.com/Project-OSRM","followers_url":"https://api.github.com/users/Project-OSRM/followers","following_url":"https://api.github.com/users/Project-OSRM/following{/other_user}","gists_url":"https://api.github.com/users/Project-OSRM/gists{/gist_id}","starred_url":"https://api.github.com/users/Project-OSRM/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Project-OSRM/subscriptions","organizations_url":"https://api.github.com/users/Project-OSRM/orgs","repos_url":"https://api.github.com/users/Project-OSRM/repos","events_url":"https://api.github.com/users/Project-OSRM/events{/privacy}","received_events_url":"https://api.github.com/users/Project-OSRM/received_events","type":"Organization","site_admin":false},"repo":{"id":2436255,"name":"osrm-backend","full_name":"Project-OSRM/osrm-backend","owner":{"login":"Project-OSRM","id":8207060,"avatar_url":"https://avatars.githubusercontent.com/u/8207060?v=3","gravatar_id":"","url":"https://api.github.com/users/Project-OSRM","html_url":"https://github.com/Project-OSRM","followers_url":"https://api.github.com/users/Project-OSRM/followers","following_url":"https://api.github.com/users/Project-OSRM/following{/other_user}","gists_url":"https://api.github.com/users/Project-OSRM/gists{/gist_id}","starred_url":"https://api.github.com/users/Project-OSRM/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Project-OSRM/subscriptions","organizations_url":"https://api.github.com/users/Project-OSRM/orgs","repos_url":"https://api.github.com/users/Project-OSRM/repos","events_url":"https://api.github.com/users/Project-OSRM/events{/privacy}","received_events_url":"https://api.github.com/users/Project-OSRM/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Project-OSRM/osrm-backend","description":"Project OSRM: C++ backend","fork":false,"url":"https://api.github.com/repos/Project-OSRM/osrm-backend","forks_url":"https://api.github.com/repos/Project-OSRM/osrm-backend/forks","keys_url":"https://api.github.com/repos/Project-OSRM/osrm-backend/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Project-OSRM/osrm-backend/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Project-OSRM/osrm-backend/teams","hooks_url":"https://api.github.com/repos/Project-OSRM/osrm-backend/hooks","issue_events_url":"https://api.github.com/repos/Project-OSRM/osrm-backend/issues/events{/number}","events_url":"https://api.github.com/repos/Project-OSRM/osrm-backend/events","assignees_url":"https://api.github.com/repos/Project-OSRM/osrm-backend/assignees{/user}","branches_url":"https://api.github.com/repos/Project-OSRM/osrm-backend/branches{/branch}","tags_url":"https://api.github.com/repos/Project-OSRM/osrm-backend/tags","blobs_url":"https://api.github.com/repos/Project-OSRM/osrm-backend/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Project-OSRM/osrm-backend/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Project-OSRM/osrm-backend/git/refs{/sha}","trees_url":"https://api.github.com/repos/Project-OSRM/osrm-backend/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Project-OSRM/osrm-backend/statuses/{sha}","languages_url":"https://api.github.com/repos/Project-OSRM/osrm-backend/languages","stargazers_url":"https://api.github.com/repos/Project-OSRM/osrm-backend/stargazers","contributors_url":"https://api.github.com/repos/Project-OSRM/osrm-backend/contributors","subscribers_url":"https://api.github.com/repos/Project-OSRM/osrm-backend/subscribers","subscription_url":"https://api.github.com/repos/Project-OSRM/osrm-backend/subscription","commits_url":"https://api.github.com/repos/Project-OSRM/osrm-backend/commits{/sha}","git_commits_url":"https://api.github.com/repos/Project-OSRM/osrm-backend/git/commits{/sha}","comments_url":"https://api.github.com/repos/Project-OSRM/osrm-backend/comments{/number}","issue_comment_url":"https://api.github.com/repos/Project-OSRM/osrm-backend/issues/comments{/number}","contents_url":"https://api.github.com/repos/Project-OSRM/osrm-backend/contents/{+path}","compare_url":"https://api.github.com/repos/Project-OSRM/osrm-backend/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Project-OSRM/osrm-backend/merges","archive_url":"https://api.github.com/repos/Project-OSRM/osrm-backend/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Project-OSRM/osrm-backend/downloads","issues_url":"https://api.github.com/repos/Project-OSRM/osrm-backend/issues{/number}","pulls_url":"https://api.github.com/repos/Project-OSRM/osrm-backend/pulls{/number}","milestones_url":"https://api.github.com/repos/Project-OSRM/osrm-backend/milestones{/number}","notifications_url":"https://api.github.com/repos/Project-OSRM/osrm-backend/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Project-OSRM/osrm-backend/labels{/name}","releases_url":"https://api.github.com/repos/Project-OSRM/osrm-backend/releases{/id}","created_at":"2011-09-22T10:05:08Z","updated_at":"2015-11-26T10:36:53Z","pushed_at":"2015-11-26T20:45:25Z","git_url":"git://github.com/Project-OSRM/osrm-backend.git","ssh_url":"git@github.com:Project-OSRM/osrm-backend.git","clone_url":"https://github.com/Project-OSRM/osrm-backend.git","svn_url":"https://github.com/Project-OSRM/osrm-backend","homepage":"http://map.project-osrm.org","size":15430,"stargazers_count":960,"watchers_count":960,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":395,"mirror_url":null,"open_issues_count":238,"forks":395,"open_issues":238,"watchers":960,"default_branch":"develop"}},"base":{"label":"Project-OSRM:develop","ref":"develop","sha":"420369fe139f08d121c3d905f22fe1785d488979","user":{"login":"Project-OSRM","id":8207060,"avatar_url":"https://avatars.githubusercontent.com/u/8207060?v=3","gravatar_id":"","url":"https://api.github.com/users/Project-OSRM","html_url":"https://github.com/Project-OSRM","followers_url":"https://api.github.com/users/Project-OSRM/followers","following_url":"https://api.github.com/users/Project-OSRM/following{/other_user}","gists_url":"https://api.github.com/users/Project-OSRM/gists{/gist_id}","starred_url":"https://api.github.com/users/Project-OSRM/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Project-OSRM/subscriptions","organizations_url":"https://api.github.com/users/Project-OSRM/orgs","repos_url":"https://api.github.com/users/Project-OSRM/repos","events_url":"https://api.github.com/users/Project-OSRM/events{/privacy}","received_events_url":"https://api.github.com/users/Project-OSRM/received_events","type":"Organization","site_admin":false},"repo":{"id":2436255,"name":"osrm-backend","full_name":"Project-OSRM/osrm-backend","owner":{"login":"Project-OSRM","id":8207060,"avatar_url":"https://avatars.githubusercontent.com/u/8207060?v=3","gravatar_id":"","url":"https://api.github.com/users/Project-OSRM","html_url":"https://github.com/Project-OSRM","followers_url":"https://api.github.com/users/Project-OSRM/followers","following_url":"https://api.github.com/users/Project-OSRM/following{/other_user}","gists_url":"https://api.github.com/users/Project-OSRM/gists{/gist_id}","starred_url":"https://api.github.com/users/Project-OSRM/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Project-OSRM/subscriptions","organizations_url":"https://api.github.com/users/Project-OSRM/orgs","repos_url":"https://api.github.com/users/Project-OSRM/repos","events_url":"https://api.github.com/users/Project-OSRM/events{/privacy}","received_events_url":"https://api.github.com/users/Project-OSRM/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Project-OSRM/osrm-backend","description":"Project OSRM: C++ backend","fork":false,"url":"https://api.github.com/repos/Project-OSRM/osrm-backend","forks_url":"https://api.github.com/repos/Project-OSRM/osrm-backend/forks","keys_url":"https://api.github.com/repos/Project-OSRM/osrm-backend/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Project-OSRM/osrm-backend/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Project-OSRM/osrm-backend/teams","hooks_url":"https://api.github.com/repos/Project-OSRM/osrm-backend/hooks","issue_events_url":"https://api.github.com/repos/Project-OSRM/osrm-backend/issues/events{/number}","events_url":"https://api.github.com/repos/Project-OSRM/osrm-backend/events","assignees_url":"https://api.github.com/repos/Project-OSRM/osrm-backend/assignees{/user}","branches_url":"https://api.github.com/repos/Project-OSRM/osrm-backend/branches{/branch}","tags_url":"https://api.github.com/repos/Project-OSRM/osrm-backend/tags","blobs_url":"https://api.github.com/repos/Project-OSRM/osrm-backend/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Project-OSRM/osrm-backend/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Project-OSRM/osrm-backend/git/refs{/sha}","trees_url":"https://api.github.com/repos/Project-OSRM/osrm-backend/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Project-OSRM/osrm-backend/statuses/{sha}","languages_url":"https://api.github.com/repos/Project-OSRM/osrm-backend/languages","stargazers_url":"https://api.github.com/repos/Project-OSRM/osrm-backend/stargazers","contributors_url":"https://api.github.com/repos/Project-OSRM/osrm-backend/contributors","subscribers_url":"https://api.github.com/repos/Project-OSRM/osrm-backend/subscribers","subscription_url":"https://api.github.com/repos/Project-OSRM/osrm-backend/subscription","commits_url":"https://api.github.com/repos/Project-OSRM/osrm-backend/commits{/sha}","git_commits_url":"https://api.github.com/repos/Project-OSRM/osrm-backend/git/commits{/sha}","comments_url":"https://api.github.com/repos/Project-OSRM/osrm-backend/comments{/number}","issue_comment_url":"https://api.github.com/repos/Project-OSRM/osrm-backend/issues/comments{/number}","contents_url":"https://api.github.com/repos/Project-OSRM/osrm-backend/contents/{+path}","compare_url":"https://api.github.com/repos/Project-OSRM/osrm-backend/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Project-OSRM/osrm-backend/merges","archive_url":"https://api.github.com/repos/Project-OSRM/osrm-backend/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Project-OSRM/osrm-backend/downloads","issues_url":"https://api.github.com/repos/Project-OSRM/osrm-backend/issues{/number}","pulls_url":"https://api.github.com/repos/Project-OSRM/osrm-backend/pulls{/number}","milestones_url":"https://api.github.com/repos/Project-OSRM/osrm-backend/milestones{/number}","notifications_url":"https://api.github.com/repos/Project-OSRM/osrm-backend/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Project-OSRM/osrm-backend/labels{/name}","releases_url":"https://api.github.com/repos/Project-OSRM/osrm-backend/releases{/id}","created_at":"2011-09-22T10:05:08Z","updated_at":"2015-11-26T10:36:53Z","pushed_at":"2015-11-26T20:45:25Z","git_url":"git://github.com/Project-OSRM/osrm-backend.git","ssh_url":"git@github.com:Project-OSRM/osrm-backend.git","clone_url":"https://github.com/Project-OSRM/osrm-backend.git","svn_url":"https://github.com/Project-OSRM/osrm-backend","homepage":"http://map.project-osrm.org","size":15430,"stargazers_count":960,"watchers_count":960,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":395,"mirror_url":null,"open_issues_count":238,"forks":395,"open_issues":238,"watchers":960,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/Project-OSRM/osrm-backend/pulls/1793"},"html":{"href":"https://github.com/Project-OSRM/osrm-backend/pull/1793"},"issue":{"href":"https://api.github.com/repos/Project-OSRM/osrm-backend/issues/1793"},"comments":{"href":"https://api.github.com/repos/Project-OSRM/osrm-backend/issues/1793/comments"},"review_comments":{"href":"https://api.github.com/repos/Project-OSRM/osrm-backend/pulls/1793/comments"},"review_comment":{"href":"https://api.github.com/repos/Project-OSRM/osrm-backend/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Project-OSRM/osrm-backend/pulls/1793/commits"},"statuses":{"href":"https://api.github.com/repos/Project-OSRM/osrm-backend/statuses/e3367ec718049e2de974b0afc1a9286d8355cbd4"}}}}