mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-18 21:51:57 +00:00
Fix update delta
This commit is contained in:
parent
7eeb463fdb
commit
f8d0aa4bc1
@ -390,7 +390,6 @@ nuraft::ptr<nuraft::buffer> getZooKeeperLogEntry(int64_t session_id, int64_t tim
|
||||
DB::writeIntBinary(session_id, buf);
|
||||
request->write(buf);
|
||||
DB::writeIntBinary(time, buf);
|
||||
DB::writeIntBinary(static_cast<int64_t>(0), buf);
|
||||
return buf.getBuffer();
|
||||
}
|
||||
|
||||
|
@ -324,7 +324,7 @@ Coordination::Error KeeperStorage::commit(int64_t commit_zxid, int64_t session_i
|
||||
|
||||
bool finish_subdelta = false;
|
||||
auto result = std::visit(
|
||||
[&, &path = delta.path]<typename DeltaType>(const DeltaType & operation) -> Coordination::Error
|
||||
[&, &path = delta.path]<typename DeltaType>(DeltaType & operation) -> Coordination::Error
|
||||
{
|
||||
if constexpr (std::same_as<DeltaType, KeeperStorage::CreateNodeDelta>)
|
||||
{
|
||||
@ -925,13 +925,13 @@ struct KeeperStorageSetRequestProcessor final : public KeeperStorageRequestProce
|
||||
request.path,
|
||||
zxid,
|
||||
KeeperStorage::UpdateNodeDelta{
|
||||
[zxid, data = request.data, time](KeeperStorage::Node & value) mutable
|
||||
[zxid, data = request.data, time](KeeperStorage::Node & value)
|
||||
{
|
||||
value.stat.version++;
|
||||
value.stat.mzxid = zxid;
|
||||
value.stat.mtime = time;
|
||||
value.stat.dataLength = data.length();
|
||||
value.setData(std::move(data));
|
||||
value.setData(data);
|
||||
},
|
||||
request.version});
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user