Skip to content

Commit

Permalink
Shard tag not needed in shard.Context (uber#4842)
Browse files Browse the repository at this point in the history
  • Loading branch information
vytautas-karpavicius authored May 24, 2022
1 parent a727049 commit 856d33f
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions service/history/shard/context.go
Original file line number Diff line number Diff line change
Expand Up @@ -657,7 +657,6 @@ Create_Loop:
// Shard is stolen, trigger shutdown of history engine
s.logger.Warn(
"Closing shard: CreateWorkflowExecution failed due to stolen shard.",
tag.ShardID(s.GetShardID()),
tag.Error(err),
)
s.closeShard()
Expand All @@ -677,7 +676,6 @@ Create_Loop:
// gets a new RangeID when it's reloaded.
s.logger.Warn(
"Closing shard: CreateWorkflowExecution failed due to unknown error.",
tag.ShardID(s.GetShardID()),
tag.Error(err),
)
s.closeShard()
Expand Down Expand Up @@ -785,7 +783,6 @@ Update_Loop:
// Shard is stolen, trigger shutdown of history engine
s.logger.Warn(
"Closing shard: UpdateWorkflowExecution failed due to stolen shard.",
tag.ShardID(s.GetShardID()),
tag.Error(err),
)
s.closeShard()
Expand All @@ -805,7 +802,6 @@ Update_Loop:
// gets a new RangeID when it's reloaded.
s.logger.Warn(
"Closing shard: UpdateWorkflowExecution failed due to unknown error.",
tag.ShardID(s.GetShardID()),
tag.Error(err),
)
s.closeShard()
Expand Down Expand Up @@ -921,7 +917,6 @@ Conflict_Resolve_Loop:
// Shard is stolen, trigger shutdown of history engine
s.logger.Warn(
"Closing shard: ConflictResolveWorkflowExecution failed due to stolen shard.",
tag.ShardID(s.GetShardID()),
tag.Error(err),
)
s.closeShard()
Expand All @@ -941,7 +936,6 @@ Conflict_Resolve_Loop:
// gets a new RangeID when it's reloaded.
s.logger.Warn(
"Closing shard: ConflictResolveWorkflowExecution failed due to unknown error.",
tag.ShardID(s.GetShardID()),
tag.Error(err),
)
s.closeShard()
Expand Down Expand Up @@ -1111,7 +1105,6 @@ Retry_Loop:
// Shard is stolen, trigger history engine shutdown
s.logger.Warn(
"Closing shard: renewRangeLocked failed due to stolen shard.",
tag.ShardID(s.GetShardID()),
tag.Error(err),
tag.Attempt(attempt),
)
Expand Down Expand Up @@ -1144,7 +1137,6 @@ Retry_Loop:
s.shardInfo = updatedShardInfo

s.logger.Info("Range updated for shardID",
tag.ShardID(s.shardInfo.ShardID),
tag.ShardRangeID(s.shardInfo.RangeID),
tag.Number(s.transferSequenceNumber),
tag.NextNumber(s.maxTransferSequenceNumber))
Expand Down Expand Up @@ -1192,7 +1184,6 @@ func (s *contextImpl) persistShardInfoLocked(
if _, ok := err.(*persistence.ShardOwnershipLostError); ok {
s.logger.Warn(
"Closing shard: updateShardInfoLocked failed due to stolen shard.",
tag.ShardID(s.GetShardID()),
tag.Error(err),
)
s.closeShard()
Expand Down Expand Up @@ -1470,7 +1461,6 @@ Retry_Loop:
// do not retry on ShardOwnershipLostError
s.logger.Warn(
"Closing shard: ReplicateFailoverMarkers failed due to stolen shard.",
tag.ShardID(s.GetShardID()),
tag.Error(err),
)
s.closeShard()
Expand Down Expand Up @@ -1592,7 +1582,7 @@ func acquireShard(
)
err := throttleRetry.Do(context.Background(), getShard)
if err != nil {
shardItem.logger.Error("Fail to acquire shard.", tag.ShardID(shardItem.shardID), tag.Error(err))
shardItem.logger.Error("Fail to acquire shard.", tag.Error(err))
return nil, err
}

Expand Down

0 comments on commit 856d33f

Please sign in to comment.