Small fix

This commit is contained in:
Antonio Andelic 2022-05-24 13:11:11 +00:00
parent 85e7118300
commit c55f4e470a
3 changed files with 16 additions and 6 deletions

View File

@ -1,12 +1,9 @@
#include <Coordination/Defines.h> #include <Coordination/Defines.h>
#include <Coordination/KeeperServer.h> #include <Coordination/KeeperServer.h>
#include "Coordination/Changelog.h"
#include "IO/WriteBuffer.h"
#include "config_core.h" #include "config_core.h"
#include <chrono> #include <chrono>
#include <condition_variable>
#include <filesystem> #include <filesystem>
#include <string> #include <string>
#include <Coordination/KeeperStateMachine.h> #include <Coordination/KeeperStateMachine.h>

View File

@ -112,7 +112,7 @@ void assertDigest(
{ {
LOG_FATAL( LOG_FATAL(
&Poco::Logger::get("KeeperStateMachine"), &Poco::Logger::get("KeeperStateMachine"),
"Digest for nodes is not matching after {} request of type '{}'.\nExpected digest - {}, actual digest {} (digest version " "Digest for nodes is not matching after {} request of type '{}'.\nExpected digest - {}, actual digest - {} (digest version "
"{}). Keeper will " "{}). Keeper will "
"terminate to avoid inconsistencies.\nExtra information about the request:\n{}", "terminate to avoid inconsistencies.\nExtra information about the request:\n{}",
committing ? "committing" : "preprocessing", committing ? "committing" : "preprocessing",

View File

@ -1297,8 +1297,21 @@ struct KeeperStorageSetACLRequestProcessor final : public KeeperStorageRequestPr
return {{zxid, Coordination::Error::ZINVALIDACL}}; return {{zxid, Coordination::Error::ZINVALIDACL}};
std::vector<KeeperStorage::Delta> new_deltas std::vector<KeeperStorage::Delta> new_deltas
= {{request.path, zxid, KeeperStorage::SetACLDelta{std::move(node_acls), request.version}}, {
{request.path, zxid, KeeperStorage::UpdateNodeDelta{[](KeeperStorage::Node & n) { ++n.stat.aversion; }}}}; {
request.path,
zxid,
KeeperStorage::SetACLDelta{std::move(node_acls), request.version}
},
{
request.path,
zxid,
KeeperStorage::UpdateNodeDelta
{
[](KeeperStorage::Node & n) { ++n.stat.aversion; }
}
}
};
digest = storage.calculateNodesDigest(digest, new_deltas); digest = storage.calculateNodesDigest(digest, new_deltas);