diff --git a/src/memgraph.cpp b/src/memgraph.cpp index 9bf50131d..9311bb076 100644 --- a/src/memgraph.cpp +++ b/src/memgraph.cpp @@ -347,8 +347,8 @@ int main(int argc, char **argv) { "In order to use write-ahead-logging you must enable " "periodic snapshots by setting the snapshot interval to a " "value larger than 0!"); - db_config.durability.snapshot_wal_mode = memgraph::storage::Config::Durability::SnapshotWalMode::DISABLED; } + db_config.durability.snapshot_wal_mode = memgraph::storage::Config::Durability::SnapshotWalMode::DISABLED; } else { if (FLAGS_storage_wal_enabled) { db_config.durability.snapshot_wal_mode = diff --git a/src/storage/v2/inmemory/storage.cpp b/src/storage/v2/inmemory/storage.cpp index dab56750b..ec2a5eeb8 100644 --- a/src/storage/v2/inmemory/storage.cpp +++ b/src/storage/v2/inmemory/storage.cpp @@ -28,6 +28,7 @@ #include "storage/v2/inmemory/replication/recovery.hpp" #include "storage/v2/inmemory/unique_constraints.hpp" #include "storage/v2/property_value.hpp" +#include "storage/v2/storage_mode.hpp" #include "utils/atomic_memory_block.hpp" #include "utils/resource_lock.hpp" #include "utils/stat.hpp" @@ -2287,7 +2288,8 @@ void InMemoryStorage::CreateSnapshotHandler( }; // Run the snapshot thread (if enabled) - if (config_.durability.snapshot_wal_mode != Config::Durability::SnapshotWalMode::DISABLED) { + if (storage_mode_ == StorageMode::IN_MEMORY_TRANSACTIONAL && + config_.durability.snapshot_wal_mode != Config::Durability::SnapshotWalMode::DISABLED) { snapshot_runner_.Run("Snapshot", config_.durability.snapshot_interval, [this, token = stop_source.get_token()]() { if (!token.stop_requested()) { this->create_snapshot_handler();