From 0e21c0c17ee2529915ef1d1bda36731be4104fc7 Mon Sep 17 00:00:00 2001 From: "A.J. Beamon" Date: Thu, 7 May 2020 16:06:46 -0700 Subject: [PATCH] More fixes to the merge problem --- fdbclient/ClientLogEvents.h | 27 ++++++++++++++++----------- 1 file changed, 16 insertions(+), 11 deletions(-) diff --git a/fdbclient/ClientLogEvents.h b/fdbclient/ClientLogEvents.h index a155133b76..614c8cf7c7 100644 --- a/fdbclient/ClientLogEvents.h +++ b/fdbclient/ClientLogEvents.h @@ -92,7 +92,7 @@ namespace FdbClientLogEvents { default: ASSERT(false); } - } + } EventGetVersion_V2() { } template Ar& serialize(Ar &ar) { @@ -115,17 +115,22 @@ namespace FdbClientLogEvents { // Version V3 of EventGetVersion starting at 6.3 struct EventGetVersion_V3 : public Event { - EventGetVersion_V3(double ts, double lat, uint32_t type, Version version) : Event(GET_VERSION_LATENCY, ts), latency(lat), readVersion(version) { - if(type == GetReadVersionRequest::PRIORITY_DEFAULT) { - priorityType = PRIORITY_DEFAULT; - } else if (type == GetReadVersionRequest::PRIORITY_BATCH) { - priorityType = PRIORITY_BATCH; - } else if (type == GetReadVersionRequest::PRIORITY_SYSTEM_IMMEDIATE){ - priorityType = PRIORITY_IMMEDIATE; - } else { - ASSERT(0); + EventGetVersion_V3(double ts, double lat, TransactionPriority priority, Version version) : Event(GET_VERSION_LATENCY, ts), latency(lat), readVersion(version) { + switch(priority) { + // Unfortunately, the enum serialized here disagrees with the enum used elsewhere for the values used by each priority + case TransactionPriority::IMMEDIATE: + priorityType = PRIORITY_IMMEDIATE; + break; + case TransactionPriority::DEFAULT: + priorityType = PRIORITY_DEFAULT; + break; + case TransactionPriority::BATCH: + priorityType = PRIORITY_BATCH; + break; + default: + ASSERT(false); } - } + } EventGetVersion_V3() { } template Ar& serialize(Ar &ar) {