Fix storage mode flag (#1609)
This commit is contained in:
parent
4788a633a6
commit
7128e1cea8
@ -1,4 +1,4 @@
|
|||||||
// Copyright 2023 Memgraph Ltd.
|
// Copyright 2024 Memgraph Ltd.
|
||||||
//
|
//
|
||||||
// Use of this software is governed by the Business Source License
|
// Use of this software is governed by the Business Source License
|
||||||
// included in the file licenses/BSL.txt; by using this file, you agree to be bound by the terms of the Business Source
|
// included in the file licenses/BSL.txt; by using this file, you agree to be bound by the terms of the Business Source
|
||||||
@ -65,14 +65,14 @@ auto FindEdges(const View view, EdgeTypeId edge_type, const VertexAccessor *from
|
|||||||
|
|
||||||
using OOMExceptionEnabler = utils::MemoryTracker::OutOfMemoryExceptionEnabler;
|
using OOMExceptionEnabler = utils::MemoryTracker::OutOfMemoryExceptionEnabler;
|
||||||
|
|
||||||
InMemoryStorage::InMemoryStorage(Config config, StorageMode storage_mode)
|
InMemoryStorage::InMemoryStorage(Config config)
|
||||||
: Storage(config, storage_mode),
|
: Storage(config, config.storage_mode),
|
||||||
recovery_{config.durability.storage_directory / durability::kSnapshotDirectory,
|
recovery_{config.durability.storage_directory / durability::kSnapshotDirectory,
|
||||||
config.durability.storage_directory / durability::kWalDirectory},
|
config.durability.storage_directory / durability::kWalDirectory},
|
||||||
lock_file_path_(config.durability.storage_directory / durability::kLockFile),
|
lock_file_path_(config.durability.storage_directory / durability::kLockFile),
|
||||||
uuid_(utils::GenerateUUID()),
|
uuid_(utils::GenerateUUID()),
|
||||||
global_locker_(file_retainer_.AddLocker()) {
|
global_locker_(file_retainer_.AddLocker()) {
|
||||||
MG_ASSERT(storage_mode != StorageMode::ON_DISK_TRANSACTIONAL,
|
MG_ASSERT(config.storage_mode != StorageMode::ON_DISK_TRANSACTIONAL,
|
||||||
"Invalid storage mode sent to InMemoryStorage constructor!");
|
"Invalid storage mode sent to InMemoryStorage constructor!");
|
||||||
if (config_.durability.snapshot_wal_mode != Config::Durability::SnapshotWalMode::DISABLED ||
|
if (config_.durability.snapshot_wal_mode != Config::Durability::SnapshotWalMode::DISABLED ||
|
||||||
config_.durability.snapshot_on_exit || config_.durability.recover_on_startup) {
|
config_.durability.snapshot_on_exit || config_.durability.recover_on_startup) {
|
||||||
@ -153,8 +153,6 @@ InMemoryStorage::InMemoryStorage(Config config, StorageMode storage_mode)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
InMemoryStorage::InMemoryStorage(Config config) : InMemoryStorage(config, StorageMode::IN_MEMORY_TRANSACTIONAL) {}
|
|
||||||
|
|
||||||
InMemoryStorage::~InMemoryStorage() {
|
InMemoryStorage::~InMemoryStorage() {
|
||||||
if (config_.gc.type == Config::Gc::Type::PERIODIC) {
|
if (config_.gc.type == Config::Gc::Type::PERIODIC) {
|
||||||
gc_runner_.Stop();
|
gc_runner_.Stop();
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
// Copyright 2023 Memgraph Ltd.
|
// Copyright 2024 Memgraph Ltd.
|
||||||
//
|
//
|
||||||
// Use of this software is governed by the Business Source License
|
// Use of this software is governed by the Business Source License
|
||||||
// included in the file licenses/BSL.txt; by using this file, you agree to be bound by the terms of the Business Source
|
// included in the file licenses/BSL.txt; by using this file, you agree to be bound by the terms of the Business Source
|
||||||
@ -60,7 +60,6 @@ class InMemoryStorage final : public Storage {
|
|||||||
/// @throw std::system_error
|
/// @throw std::system_error
|
||||||
/// @throw std::bad_alloc
|
/// @throw std::bad_alloc
|
||||||
explicit InMemoryStorage(Config config = Config());
|
explicit InMemoryStorage(Config config = Config());
|
||||||
InMemoryStorage(Config config, StorageMode storage_mode);
|
|
||||||
|
|
||||||
InMemoryStorage(const InMemoryStorage &) = delete;
|
InMemoryStorage(const InMemoryStorage &) = delete;
|
||||||
InMemoryStorage(InMemoryStorage &&) = delete;
|
InMemoryStorage(InMemoryStorage &&) = delete;
|
||||||
|
Loading…
Reference in New Issue
Block a user