diff --git a/CHANGELOG.md b/CHANGELOG.md index ccfdd140f..0b909c33e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,6 +17,7 @@ - `OSRM` object accepts a new option `memory_file` that stores the memory in a file on disk. - Internals - CHANGED #4845 #4968: Updated segregated intersection identification + - REMOVED: Remove `.timestamp` file since it was unused. - Documentation: - ADDED: Add documentation about OSM node ids in nearest service response [#4436](https://github.com/Project-OSRM/osrm-backend/pull/4436) - Performance diff --git a/include/engine/datafacade/contiguous_internalmem_datafacade.hpp b/include/engine/datafacade/contiguous_internalmem_datafacade.hpp index 32ed08151..bdcfd9224 100644 --- a/include/engine/datafacade/contiguous_internalmem_datafacade.hpp +++ b/include/engine/datafacade/contiguous_internalmem_datafacade.hpp @@ -233,16 +233,6 @@ class ContiguousInternalMemoryDataFacadeBase : public BaseDataFacade exclude_mask = m_profile_properties->excludable_classes[exclude_index]; } - void InitializeTimestampPointer(storage::DataLayout &data_layout, char *memory_block) - { - auto timestamp_ptr = - data_layout.GetBlockPtr(memory_block, storage::DataLayout::TIMESTAMP); - m_timestamp.resize(data_layout.GetBlockSize(storage::DataLayout::TIMESTAMP)); - std::copy(timestamp_ptr, - timestamp_ptr + data_layout.GetBlockSize(storage::DataLayout::TIMESTAMP), - m_timestamp.begin()); - } - void InitializeChecksumPointer(storage::DataLayout &data_layout, char *memory_block) { m_check_sum = @@ -543,7 +533,6 @@ class ContiguousInternalMemoryDataFacadeBase : public BaseDataFacade InitializeEdgeInformationPointers(data_layout, memory_block); InitializeTurnPenalties(data_layout, memory_block); InitializeGeometryPointers(data_layout, memory_block); - InitializeTimestampPointer(data_layout, memory_block); InitializeNamePointers(data_layout, memory_block); InitializeTurnLaneDescriptionsPointers(data_layout, memory_block); InitializeProfilePropertiesPointer(data_layout, memory_block, exclude_index); @@ -851,8 +840,6 @@ class ContiguousInternalMemoryDataFacadeBase : public BaseDataFacade return m_datasources->GetSourceName(id); } - std::string GetTimestamp() const override final { return m_timestamp; } - bool GetContinueStraightDefault() const override final { return m_profile_properties->continue_straight_at_waypoint; diff --git a/include/engine/datafacade/datafacade_base.hpp b/include/engine/datafacade/datafacade_base.hpp index c1bc16564..46d8e3350 100644 --- a/include/engine/datafacade/datafacade_base.hpp +++ b/include/engine/datafacade/datafacade_base.hpp @@ -173,8 +173,6 @@ class BaseDataFacade virtual StringView GetExitsForID(const NameID id) const = 0; - virtual std::string GetTimestamp() const = 0; - virtual bool GetContinueStraightDefault() const = 0; virtual double GetMapMatchingMaxSpeed() const = 0; diff --git a/include/extractor/extractor_config.hpp b/include/extractor/extractor_config.hpp index 553c9b9ca..1bd305821 100644 --- a/include/extractor/extractor_config.hpp +++ b/include/extractor/extractor_config.hpp @@ -52,7 +52,6 @@ struct ExtractorConfig final : storage::IOConfig ".osrm.names", ".osrm.tls", ".osrm.tld", - ".osrm.timestamp", ".osrm.geometry", ".osrm.nbg_nodes", ".osrm.ebg_nodes", diff --git a/include/storage/shared_datatype.hpp b/include/storage/shared_datatype.hpp index eaec021f9..1345f656a 100644 --- a/include/storage/shared_datatype.hpp +++ b/include/storage/shared_datatype.hpp @@ -50,7 +50,6 @@ const constexpr char *block_id_to_name[] = {"IGNORE_BLOCK", "GEOMETRIES_FWD_DATASOURCES_LIST", "GEOMETRIES_REV_DATASOURCES_LIST", "HSGR_CHECKSUM", - "TIMESTAMP", "FILE_INDEX_PATH", "DATASOURCES_NAMES", "PROPERTIES", @@ -131,7 +130,6 @@ class DataLayout GEOMETRIES_FWD_DATASOURCES_LIST, GEOMETRIES_REV_DATASOURCES_LIST, HSGR_CHECKSUM, - TIMESTAMP, FILE_INDEX_PATH, DATASOURCES_NAMES, PROPERTIES, diff --git a/include/storage/storage_config.hpp b/include/storage/storage_config.hpp index 916b47ffd..4d133f087 100644 --- a/include/storage/storage_config.hpp +++ b/include/storage/storage_config.hpp @@ -54,7 +54,6 @@ struct StorageConfig final : IOConfig ".osrm.fileIndex", ".osrm.edges", ".osrm.geometry", - ".osrm.timestamp", ".osrm.turn_weight_penalties", ".osrm.turn_duration_penalties", ".osrm.datasource_names", diff --git a/src/extractor/extractor.cpp b/src/extractor/extractor.cpp index 54a75704f..a7dca09dc 100644 --- a/src/extractor/extractor.cpp +++ b/src/extractor/extractor.cpp @@ -407,11 +407,6 @@ Extractor::ParseOSMData(ScriptingEnvironment &scripting_environment, timestamp = "n/a"; } util::Log() << "timestamp: " << timestamp; - - storage::io::FileWriter timestamp_file(config.GetPath(".osrm.timestamp"), - storage::io::FileWriter::GenerateFingerprint); - - timestamp_file.WriteFrom(timestamp.c_str(), timestamp.length()); } // Extraction containers and restriction parser diff --git a/src/storage/storage.cpp b/src/storage/storage.cpp index 8a8f5050d..eec903bcc 100644 --- a/src/storage/storage.cpp +++ b/src/storage/storage.cpp @@ -257,14 +257,6 @@ void Storage::PopulateLayout(DataLayout &layout) make_block(tree_levels_size)); } - // read timestampsize - { - io::FileReader timestamp_file(config.GetPath(".osrm.timestamp"), - io::FileReader::VerifyFingerprint); - const auto timestamp_size = timestamp_file.GetSize(); - layout.SetBlock(DataLayout::TIMESTAMP, make_block(timestamp_size)); - } - std::unordered_map name_to_block_id = { {"/mld/multilevelgraph/node_array", DataLayout::MLD_GRAPH_NODE_LIST}, {"/mld/multilevelgraph/edge_array", DataLayout::MLD_GRAPH_EDGE_LIST}, @@ -642,18 +634,6 @@ void Storage::PopulateData(const DataLayout &layout, char *memory_ptr) turn_duration_penalties); } - // store timestamp - { - io::FileReader timestamp_file(config.GetPath(".osrm.timestamp"), - io::FileReader::VerifyFingerprint); - const auto timestamp_size = timestamp_file.GetSize(); - - const auto timestamp_ptr = - layout.GetBlockPtr(memory_ptr, DataLayout::TIMESTAMP); - BOOST_ASSERT(timestamp_size == layout.GetBlockEntries(DataLayout::TIMESTAMP)); - timestamp_file.ReadInto(timestamp_ptr, timestamp_size); - } - // store search tree portion of rtree { io::FileReader tree_node_file(config.GetPath(".osrm.ramIndex"), diff --git a/unit_tests/mocks/mock_datafacade.hpp b/unit_tests/mocks/mock_datafacade.hpp index dfbc34415..830dc4138 100644 --- a/unit_tests/mocks/mock_datafacade.hpp +++ b/unit_tests/mocks/mock_datafacade.hpp @@ -219,7 +219,6 @@ class MockBaseDataFacade : public engine::datafacade::BaseDataFacade StringView GetDestinationsForID(const NameID) const override final { return {}; } StringView GetExitsForID(const NameID) const override final { return {}; } - std::string GetTimestamp() const override { return ""; } bool GetContinueStraightDefault() const override { return true; } double GetMapMatchingMaxSpeed() const override { return 180 / 3.6; } const char *GetWeightName() const override final { return "duration"; }