mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-25 17:12:03 +00:00
compatible.
This commit is contained in:
parent
b7c3327d5b
commit
ad124a4d10
@ -264,8 +264,8 @@ nuraft::ptr<nuraft::buffer> getZooKeeperLogEntry(int64_t session_id, int64_t tim
|
||||
{
|
||||
DB::WriteBufferFromNuraftBuffer buf;
|
||||
DB::writeIntBinary(session_id, buf);
|
||||
DB::writeIntBinary(time, buf);
|
||||
request->write(buf);
|
||||
DB::writeIntBinary(time, buf);
|
||||
return buf.getBuffer();
|
||||
}
|
||||
|
||||
|
@ -22,7 +22,6 @@ namespace
|
||||
ReadBufferFromNuraftBuffer buffer(data);
|
||||
KeeperStorage::RequestForSession request_for_session;
|
||||
readIntBinary(request_for_session.session_id, buffer);
|
||||
readIntBinary(request_for_session.time, buffer);
|
||||
|
||||
int32_t length;
|
||||
Coordination::read(length, buffer);
|
||||
@ -37,6 +36,8 @@ namespace
|
||||
request_for_session.request = Coordination::ZooKeeperRequestFactory::instance().get(opnum);
|
||||
request_for_session.request->xid = xid;
|
||||
request_for_session.request->readImpl(buffer);
|
||||
|
||||
readIntBinary(request_for_session.time, buffer);
|
||||
return request_for_session;
|
||||
}
|
||||
}
|
||||
|
@ -1218,10 +1218,10 @@ nuraft::ptr<nuraft::buffer> getBufferFromZKRequest(int64_t session_id, const Coo
|
||||
{
|
||||
DB::WriteBufferFromNuraftBuffer buf;
|
||||
DB::writeIntBinary(session_id, buf);
|
||||
request->write(buf);
|
||||
using namespace std::chrono;
|
||||
auto time = duration_cast<milliseconds>(system_clock::now().time_since_epoch()).count();
|
||||
DB::writeIntBinary(time, buf);
|
||||
request->write(buf);
|
||||
return buf.getBuffer();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user