diff --git a/fdbclient/FDBTypes.h b/fdbclient/FDBTypes.h index 9fc1a45da0..76c74c41b9 100644 --- a/fdbclient/FDBTypes.h +++ b/fdbclient/FDBTypes.h @@ -741,7 +741,7 @@ struct TLogSpillType { operator SpillType() const { return SpillType(type); } template - void serialize_unversioned(Ar& ar) { serializer(ar, type); } + void serialize(Ar& ar) { serializer(ar, type); } std::string toString() const { switch( type ) { @@ -762,29 +762,6 @@ struct TLogSpillType { uint32_t type; }; -template void load( Ar& ar, TLogSpillType& logSpillType ) { logSpillType.serialize_unversioned(ar); } -template void save( Ar& ar, TLogSpillType const& logSpillType ) { const_cast(logSpillType).serialize_unversioned(ar); } - -template <> -struct struct_like_traits : std::true_type { - using Member = TLogSpillType; - using types = pack; - - template - static const index_t& get(const Member& m, Context&) { - if constexpr (i == 0) { - return m.type; - } - } - - template - static const void assign(Member& m, const Type& t, Context&) { - if constexpr (i == 0) { - m = static_cast(t); - } - } -}; - //Contains the amount of free and total space for a storage server, in bytes struct StorageBytes { int64_t free; diff --git a/fdbserver/TLogServer.actor.cpp b/fdbserver/TLogServer.actor.cpp index 7a9940d56f..1682d581f0 100644 --- a/fdbserver/TLogServer.actor.cpp +++ b/fdbserver/TLogServer.actor.cpp @@ -2424,7 +2424,7 @@ ACTOR Future restorePersistentState( TLogData* self, LocalityData locality DUMPTOKEN( recruited.confirmRunning ); ProtocolVersion protocolVersion = BinaryReader::fromStringRef( fProtocolVersions.get()[idx].value, Unversioned() ); - TLogSpillType logSpillType = BinaryReader::fromStringRef( fTLogSpillTypes.get()[idx].value, Unversioned() ); + TLogSpillType logSpillType = BinaryReader::fromStringRef( fTLogSpillTypes.get()[idx].value, AssumeVersion(protocolVersion) ); //We do not need the remoteTag, because we will not be loading any additional data logData = Reference( new LogData(self, recruited, Tag(), true, id_logRouterTags[id1], id_txsTags[id1], UID(), protocolVersion, logSpillType, std::vector()) );