From ff171e293e3e93cbf9e13888f80abde856b36b02 Mon Sep 17 00:00:00 2001 From: Evan Tschannen Date: Wed, 31 Jul 2019 16:04:35 -0700 Subject: [PATCH] fix: always make sure to add txsTags to localTags for remote logs --- fdbserver/OldTLogServer_6_0.actor.cpp | 2 +- fdbserver/TLogServer.actor.cpp | 2 +- fdbserver/TagPartitionedLogSystem.actor.cpp | 15 +++++++++------ 3 files changed, 11 insertions(+), 8 deletions(-) diff --git a/fdbserver/OldTLogServer_6_0.actor.cpp b/fdbserver/OldTLogServer_6_0.actor.cpp index 10f191b937..f9c9535d2b 100644 --- a/fdbserver/OldTLogServer_6_0.actor.cpp +++ b/fdbserver/OldTLogServer_6_0.actor.cpp @@ -402,7 +402,7 @@ struct LogData : NonCopyable, public ReferenceCounted { //only callable after getTagData returns a null reference Reference createTagData(Tag tag, Version popped, bool nothingPersistent, bool poppedRecently, bool unpoppedRecovered) { - if(tag.locality != tagLocalityLogRouter && tag.locality != tagLocalityTxs && tag != txsTag && allTags.size() && !allTags.count(tag) && popped <= recoveredAt) { + if(tag.locality != tagLocalityLogRouter && allTags.size() && !allTags.count(tag) && popped <= recoveredAt) { popped = recoveredAt + 1; } Reference newTagData = Reference( new TagData(tag, popped, nothingPersistent, poppedRecently, unpoppedRecovered) ); diff --git a/fdbserver/TLogServer.actor.cpp b/fdbserver/TLogServer.actor.cpp index 95d51267c5..ee77cd47df 100644 --- a/fdbserver/TLogServer.actor.cpp +++ b/fdbserver/TLogServer.actor.cpp @@ -452,7 +452,7 @@ struct LogData : NonCopyable, public ReferenceCounted { //only callable after getTagData returns a null reference Reference createTagData(Tag tag, Version popped, bool nothingPersistent, bool poppedRecently, bool unpoppedRecovered) { - if(tag.locality != tagLocalityLogRouter && tag.locality != tagLocalityTxs && tag != txsTag && allTags.size() && !allTags.count(tag) && popped <= recoveredAt) { + if(tag.locality != tagLocalityLogRouter && allTags.size() && !allTags.count(tag) && popped <= recoveredAt) { popped = recoveredAt + 1; } Reference newTagData = Reference( new TagData(tag, popped, 0, nothingPersistent, poppedRecently, unpoppedRecovered) ); diff --git a/fdbserver/TagPartitionedLogSystem.actor.cpp b/fdbserver/TagPartitionedLogSystem.actor.cpp index c1cbd092b4..086002af2d 100644 --- a/fdbserver/TagPartitionedLogSystem.actor.cpp +++ b/fdbserver/TagPartitionedLogSystem.actor.cpp @@ -1868,12 +1868,15 @@ struct TagPartitionedLogSystem : ILogSystem, ReferenceCountedtxsTags; i++) { - localTags.push_back(Tag(tagLocalityTxs, i)); - } + } + } + + if(oldLogSystem->tLogs.size()) { + if(nonShardedTxs) { + localTags.push_back(txsTag); + } else { + for(int i = 0; i < self->txsTags; i++) { + localTags.push_back(Tag(tagLocalityTxs, i)); } } }