Improve messages and comments
This commit is contained in:
parent
28eef7edf4
commit
e32adaa18c
@ -2211,7 +2211,10 @@ void RunTriggersIndividually(const utils::SkipList<Trigger> &triggers, Interpret
|
|||||||
const auto &commit_error = maybe_commit_error.GetError();
|
const auto &commit_error = maybe_commit_error.GetError();
|
||||||
switch (commit_error.type) {
|
switch (commit_error.type) {
|
||||||
case storage::CommitError::Type::UNABLE_TO_REPLICATE: {
|
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;
|
break;
|
||||||
}
|
}
|
||||||
case storage::CommitError::Type::CONSTRAINT_VIOLATION: {
|
case storage::CommitError::Type::CONSTRAINT_VIOLATION: {
|
||||||
@ -2286,7 +2289,7 @@ void Interpreter::Commit() {
|
|||||||
switch (commit_error.type) {
|
switch (commit_error.type) {
|
||||||
case storage::CommitError::Type::UNABLE_TO_REPLICATE: {
|
case storage::CommitError::Type::UNABLE_TO_REPLICATE: {
|
||||||
reset_necessary_members();
|
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;
|
break;
|
||||||
}
|
}
|
||||||
case storage::CommitError::Type::CONSTRAINT_VIOLATION: {
|
case storage::CommitError::Type::CONSTRAINT_VIOLATION: {
|
||||||
|
@ -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
|
// because there is no an abort op for that yet, one idea is to just apply
|
||||||
// reverse operation, e.g., CreateIndex <-> DropIndex.
|
// 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
|
// 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
|
// object, while the second SYNC replica is dead? (replication clients are
|
||||||
// stored in a vector and accessed one by one)
|
// stored in a vector and accessed one by one)
|
||||||
|
Loading…
Reference in New Issue
Block a user