diff --git a/src/query/interpreter.cpp b/src/query/interpreter.cpp index 9ba4bc13e..0910ff1f1 100644 --- a/src/query/interpreter.cpp +++ b/src/query/interpreter.cpp @@ -2211,7 +2211,10 @@ void RunTriggersIndividually(const utils::SkipList &triggers, Interpret const auto &commit_error = maybe_commit_error.GetError(); switch (commit_error.type) { case storage::CommitError::Type::UNABLE_TO_REPLICATE: { - spdlog::warn("Unable to replicate to SYNC replica on COMMIT"); + // TODO(gitbuda): This is tricky because this is an internal + // operation. Consider stopping main Memgraph instance here. + spdlog::warn("Trigger '{}' failed to commit due to inability to replicate data to SYNC replica", + trigger.Name()); break; } case storage::CommitError::Type::CONSTRAINT_VIOLATION: { @@ -2286,7 +2289,7 @@ void Interpreter::Commit() { switch (commit_error.type) { case storage::CommitError::Type::UNABLE_TO_REPLICATE: { reset_necessary_members(); - throw QueryException("Unable to replicate to SYNC replica"); + throw QueryException("Unable to commit due to inability to replicate to SYNC replica"); break; } case storage::CommitError::Type::CONSTRAINT_VIOLATION: { diff --git a/src/storage/v2/storage.cpp b/src/storage/v2/storage.cpp index 2f67f211c..074c61e13 100644 --- a/src/storage/v2/storage.cpp +++ b/src/storage/v2/storage.cpp @@ -1165,6 +1165,10 @@ EdgeTypeId Storage::NameToEdgeType(const std::string_view &name) { // because there is no an abort op for that yet, one idea is to just apply // reverse operation, e.g., CreateIndex <-> DropIndex. // +// Another idea is to double check that all replicas have relevant data prior +// to calling MarkFinished. That approach would work in both data replication +// and global operation cases. +// // EDGE CASE 1: What if the first SYNC replica is alive, receives the delta // object, while the second SYNC replica is dead? (replication clients are // stored in a vector and accessed one by one)