Skip to content

Commit

Permalink
peering: peering partition failover fixes (#16673)
Browse files Browse the repository at this point in the history
add local source partition for peered upstreams
  • Loading branch information
ndhanushkodi authored and nathancoleman committed May 15, 2023
1 parent 9c1ee02 commit 598f082
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .changelog/16673.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:bug
peering: Fixes a bug where the importing partition was not added to peered failover targets, which causes issues when the importing partition is a non-default partition.
```
3 changes: 3 additions & 0 deletions agent/proxycfg/upstreams.go
Original file line number Diff line number Diff line change
Expand Up @@ -447,6 +447,9 @@ func (s *handlerUpstreams) watchUpstreamTarget(ctx context.Context, snap *Config

if opts.peer != "" {
uid = NewUpstreamIDFromTargetID(opts.chainID)
// chainID has the partition stripped. However, when a target is in a cluster peer, the partition should be set
// to the local partition (i.e chain.Partition), since the peered target is imported into the local partition.
uid.OverridePartition(opts.entMeta.PartitionOrDefault())
correlationID = upstreamPeerWatchIDPrefix + uid.String()
}

Expand Down

0 comments on commit 598f082

Please sign in to comment.