Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Shard tag not needed in shard.Context #4842

Merged
merged 2 commits into from
May 24, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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