Merge pull request #570 from etschannen/feature-remote-logs

properly handle zero logRouterTags
This commit is contained in:
Balachandar Namasivayam 2018-07-06 16:58:51 -07:00 committed by GitHub
commit d58ccab22a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 2 deletions

View File

@ -650,6 +650,10 @@ struct TagPartitionedLogSystem : ILogSystem, ReferenceCounted<TagPartitionedLogS
}
if(bestOldSet == -1) {
if(oldLogData[i].logRouterTags == 0) {
TraceEvent("TLogPeekLocalNoLogRouterTags", dbgid).detail("Tag", tag.toString()).detail("Begin", begin).detail("End", end).detail("LastBegin", lastBegin).detail("OldLogDataSize", oldLogData.size()).detail("Idx", i);
throw worker_removed();
}
i++;
continue;
}
@ -1323,7 +1327,7 @@ struct TagPartitionedLogSystem : ILogSystem, ReferenceCounted<TagPartitionedLogS
lockResults.resize(logServers.size());
std::set<int8_t> lockedLocalities;
bool foundSpecial = false;
bool foundSpecial = prevState.logRouterTags == 0;
for( int i=0; i < logServers.size(); i++ ) {
if(logServers[i]->locality == tagLocalitySpecial || logServers[i]->locality == tagLocalityUpgraded) {
foundSpecial = true;
@ -1337,7 +1341,7 @@ struct TagPartitionedLogSystem : ILogSystem, ReferenceCounted<TagPartitionedLogS
}
for( auto& old : oldLogData ) {
if(foundSpecial) {
if(foundSpecial || old.logRouterTags == 0) {
break;
}
for( auto& log : old.tLogs ) {