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

Fix metric offset overflow for large MLD partitions #6124

Merged
merged 2 commits into from
Sep 21, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
- Routing:
- FIXED: Fix generation of inefficient MLD partitions [#6084](https://github.com/Project-OSRM/osrm-backend/pull/6084)
- FIXED: Fix MLD level mask generation to support 64-bit masks. [#6123](https://github.com/Project-OSRM/osrm-backend/pull/6123)
- FIXED: Fix metric offset overflow for large MLD partitions. This breaks the **data format** [#6124](https://github.com/Project-OSRM/osrm-backend/pull/6124)

# 5.25.0
- Changes from 5.24.0
Expand Down
6 changes: 2 additions & 4 deletions include/partitioner/cell_storage.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,9 @@ namespace detail
template <storage::Ownership Ownership> class CellStorageImpl
{
public:
using ValueOffset = std::uint32_t;
using BoundaryOffset = std::uint32_t;
using ValueOffset = std::uint64_t;
using BoundaryOffset = std::uint64_t;
using BoundarySize = std::uint32_t;
Copy link
Member Author

@mjjbell mjjbell Sep 13, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OSM contains ~800 million ways, so 32 bit should be safe to use for boundary sizes...for now.

using SourceIndex = std::uint32_t;
using DestinationIndex = std::uint32_t;

static constexpr auto INVALID_VALUE_OFFSET = std::numeric_limits<ValueOffset>::max();
static constexpr auto INVALID_BOUNDARY_OFFSET = std::numeric_limits<BoundaryOffset>::max();
Expand Down