mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-24 08:32:02 +00:00
Update NuRaft buffer to 64 bit size
This commit is contained in:
parent
34d12063f8
commit
dc893f9644
2
contrib/NuRaft
vendored
2
contrib/NuRaft
vendored
@ -1 +1 @@
|
||||
Subproject commit 2a1bf7d87b4a03561fc66fbb49cee8a288983c5d
|
||||
Subproject commit 976874b7aa7f422bf4ea595bb7d1166c617b1c26
|
@ -23,9 +23,10 @@ using IndexToLogEntry = std::unordered_map<uint64_t, LogEntryPtr>;
|
||||
enum class ChangelogVersion : uint8_t
|
||||
{
|
||||
V0 = 0,
|
||||
V1 = 1, /// with 64 bit buffer header
|
||||
};
|
||||
|
||||
static constexpr auto CURRENT_CHANGELOG_VERSION = ChangelogVersion::V0;
|
||||
static constexpr auto CURRENT_CHANGELOG_VERSION = ChangelogVersion::V1;
|
||||
|
||||
struct ChangelogRecordHeader
|
||||
{
|
||||
|
@ -204,7 +204,7 @@ SnapshotMetadataPtr KeeperStorageSnapshot::deserialize(KeeperStorage & storage,
|
||||
uint8_t version;
|
||||
readBinary(version, in);
|
||||
SnapshotVersion current_version = static_cast<SnapshotVersion>(version);
|
||||
if (current_version > SnapshotVersion::V1)
|
||||
if (current_version > CURRENT_SNAPSHOT_VERSION)
|
||||
throw Exception(ErrorCodes::UNKNOWN_FORMAT_VERSION, "Unsupported snapshot version {}", version);
|
||||
|
||||
SnapshotMetadataPtr result = deserializeSnapshotMetadata(in);
|
||||
|
@ -14,8 +14,11 @@ enum SnapshotVersion : uint8_t
|
||||
{
|
||||
V0 = 0,
|
||||
V1 = 1, /// with ACL map
|
||||
V2 = 2, /// with 64 bit buffer header
|
||||
};
|
||||
|
||||
static constexpr auto CURRENT_SNAPSHOT_VERSION = SnapshotVersion::V2;
|
||||
|
||||
struct KeeperStorageSnapshot
|
||||
{
|
||||
public:
|
||||
@ -30,7 +33,7 @@ public:
|
||||
|
||||
KeeperStorage * storage;
|
||||
|
||||
SnapshotVersion version = SnapshotVersion::V1;
|
||||
SnapshotVersion version = CURRENT_SNAPSHOT_VERSION;
|
||||
SnapshotMetadataPtr snapshot_meta;
|
||||
int64_t session_id;
|
||||
size_t snapshot_container_size;
|
||||
|
Loading…
Reference in New Issue
Block a user