Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
vdarulis committed Dec 1, 2020
1 parent 4a29c10 commit 8db0066
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/aggregator/client/tcp_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -221,21 +221,21 @@ func (c *TCPClient) Close() error {
return c.writerMgr.Close()
}

// ActivePlacement returns the currently active placement
func (c *TCPClient) ActivePlacement() (placement.Placement, error) {
// ActivePlacement returns a copy of the currently active placement and its version.
func (c *TCPClient) ActivePlacement() (placement.Placement, int, error) {
stagedPlacement, onStagedPlacementDoneFn, err := c.placementWatcher.ActiveStagedPlacement()
if err != nil {
return nil, err
return nil, 0, err
}
defer onStagedPlacementDoneFn()

placement, onPlacementDoneFn, err := stagedPlacement.ActivePlacement()
if err != nil {
return nil, err
return nil, 0, err
}
defer onPlacementDoneFn()

return placement.Clone(), nil
// TODO: expose version once related PR lands
return placement.Clone(), 0, nil
}

//nolint:gocritic
Expand Down

0 comments on commit 8db0066

Please sign in to comment.