Skip to content

Commit

Permalink
Cherry-pick aba0d83 with conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
vitess-bot[bot] committed Feb 27, 2024
1 parent bfda4ee commit 80f0390
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 0 deletions.
5 changes: 5 additions & 0 deletions go/vt/topo/memorytopo/election.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,11 @@ import (

// NewLeaderParticipation is part of the topo.Server interface
func (c *Conn) NewLeaderParticipation(name, id string) (topo.LeaderParticipation, error) {
<<<<<<< HEAD
=======
c.factory.callstats.Add([]string{"NewLeaderParticipation"}, 1)

>>>>>>> aba0d83c8a (CI: Address data races on memorytopo Conn.closed (#15365))
if c.closed.Load() {
return nil, ErrConnectionClosed
}
Expand Down
4 changes: 4 additions & 0 deletions go/vt/topo/memorytopo/memorytopo.go
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,10 @@ func (c *Conn) dial(ctx context.Context) error {

// Close is part of the topo.Conn interface.
func (c *Conn) Close() {
<<<<<<< HEAD
=======
c.factory.callstats.Add([]string{"Close"}, 1)
>>>>>>> aba0d83c8a (CI: Address data races on memorytopo Conn.closed (#15365))
c.closed.Store(true)
}

Expand Down
10 changes: 10 additions & 0 deletions go/vt/topo/memorytopo/watch.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,11 @@ import (

// Watch is part of the topo.Conn interface.
func (c *Conn) Watch(ctx context.Context, filePath string) (*topo.WatchData, <-chan *topo.WatchData, error) {
<<<<<<< HEAD
=======
c.factory.callstats.Add([]string{"Watch"}, 1)

>>>>>>> aba0d83c8a (CI: Address data races on memorytopo Conn.closed (#15365))
if c.closed.Load() {
return nil, nil, ErrConnectionClosed
}
Expand Down Expand Up @@ -75,6 +80,11 @@ func (c *Conn) Watch(ctx context.Context, filePath string) (*topo.WatchData, <-c

// WatchRecursive is part of the topo.Conn interface.
func (c *Conn) WatchRecursive(ctx context.Context, dirpath string) ([]*topo.WatchDataRecursive, <-chan *topo.WatchDataRecursive, error) {
<<<<<<< HEAD
=======
c.factory.callstats.Add([]string{"WatchRecursive"}, 1)

>>>>>>> aba0d83c8a (CI: Address data races on memorytopo Conn.closed (#15365))
if c.closed.Load() {
return nil, nil, ErrConnectionClosed
}
Expand Down

0 comments on commit 80f0390

Please sign in to comment.