mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-27 01:51:59 +00:00
Fix keeper storage
This commit is contained in:
parent
aa1fb9b2e7
commit
aff6b7a8d6
@ -13,7 +13,7 @@
|
|||||||
#include <iomanip>
|
#include <iomanip>
|
||||||
#include <mutex>
|
#include <mutex>
|
||||||
#include <functional>
|
#include <functional>
|
||||||
#include <Common/logger_useful.h>
|
#include <base/defines.h>
|
||||||
|
|
||||||
namespace DB
|
namespace DB
|
||||||
{
|
{
|
||||||
@ -365,7 +365,7 @@ struct KeeperStorageCreateRequestProcessor final : public KeeperStorageRequestPr
|
|||||||
|
|
||||||
if (zxid > parent.stat.pzxid)
|
if (zxid > parent.stat.pzxid)
|
||||||
parent.stat.pzxid = zxid;
|
parent.stat.pzxid = zxid;
|
||||||
assert(parent.stat.numChildren == static_cast<int32_t>(parent.getChildren().size()));
|
chassert(parent.stat.numChildren == static_cast<int32_t>(parent.getChildren().size()));
|
||||||
});
|
});
|
||||||
|
|
||||||
response.path_created = path_created;
|
response.path_created = path_created;
|
||||||
@ -387,7 +387,7 @@ struct KeeperStorageCreateRequestProcessor final : public KeeperStorageRequestPr
|
|||||||
undo_parent.stat.cversion = prev_parent_cversion;
|
undo_parent.stat.cversion = prev_parent_cversion;
|
||||||
undo_parent.stat.pzxid = prev_parent_zxid;
|
undo_parent.stat.pzxid = prev_parent_zxid;
|
||||||
undo_parent.removeChild(child_path);
|
undo_parent.removeChild(child_path);
|
||||||
assert(undo_parent.stat.numChildren == static_cast<int32_t>(undo_parent.getChildren().size()));
|
chassert(undo_parent.stat.numChildren == static_cast<int32_t>(undo_parent.getChildren().size()));
|
||||||
});
|
});
|
||||||
|
|
||||||
storage.container.erase(path_created);
|
storage.container.erase(path_created);
|
||||||
@ -522,7 +522,7 @@ struct KeeperStorageRemoveRequestProcessor final : public KeeperStorageRequestPr
|
|||||||
--parent.stat.numChildren;
|
--parent.stat.numChildren;
|
||||||
++parent.stat.cversion;
|
++parent.stat.cversion;
|
||||||
parent.removeChild(child_basename);
|
parent.removeChild(child_basename);
|
||||||
assert(parent.stat.numChildren == static_cast<int32_t>(parent.getChildren().size()));
|
chassert(parent.stat.numChildren == static_cast<int32_t>(parent.getChildren().size()));
|
||||||
});
|
});
|
||||||
|
|
||||||
response.error = Coordination::Error::ZOK;
|
response.error = Coordination::Error::ZOK;
|
||||||
@ -544,7 +544,7 @@ struct KeeperStorageRemoveRequestProcessor final : public KeeperStorageRequestPr
|
|||||||
++parent.stat.numChildren;
|
++parent.stat.numChildren;
|
||||||
--parent.stat.cversion;
|
--parent.stat.cversion;
|
||||||
parent.addChild(child_name);
|
parent.addChild(child_name);
|
||||||
assert(parent.stat.numChildren == static_cast<int32_t>(parent.getChildren().size()));
|
chassert(parent.stat.numChildren == static_cast<int32_t>(parent.getChildren().size()));
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
@ -1115,7 +1115,7 @@ KeeperStorage::ResponsesForSessions KeeperStorage::processRequest(const Coordina
|
|||||||
++parent.stat.cversion;
|
++parent.stat.cversion;
|
||||||
auto base_name = getBaseName(ephemeral_path);
|
auto base_name = getBaseName(ephemeral_path);
|
||||||
parent.removeChild(base_name);
|
parent.removeChild(base_name);
|
||||||
assert(parent.stat.numChildren == static_cast<int32_t>(parent.getChildren().size()));
|
chassert(parent.stat.numChildren == static_cast<int32_t>(parent.getChildren().size()));
|
||||||
});
|
});
|
||||||
|
|
||||||
container.erase(ephemeral_path);
|
container.erase(ephemeral_path);
|
||||||
|
Loading…
Reference in New Issue
Block a user