// TODO: why do we need a deep copy here?
func (s *ContextImpl) copyShardInfo(shardInfo *persistencespb.ShardInfo) *persistencespb.ShardInfo {
context_impl.go
// need to ser/de to make a deep copy of queue state
queueStates := make(map[int32]*persistencespb.QueueState, len(shardInfo.QueueStates))
for k, v := range shardInfo.QueueStates {
blob, _ := s.payloadSerializer.QueueStateToBlob(v)
queueState, _ := s.payloadSerializer.QueueStateFromBlob(blob)