Bugfix: Runing periodic snapshot even if in analytical mode
This commit is contained in:
parent
2ac649f3b5
commit
f3734bcb5d
@ -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 =
|
||||
|
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user