Skip to content

Commit

Permalink
improve logging
Browse files Browse the repository at this point in the history
Signed-off-by: Tim Vaillancourt <[email protected]>
  • Loading branch information
timvaillancourt committed Feb 10, 2025
1 parent 9f6620d commit dcefb1f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions go/vt/vtorc/logic/cell_discovery.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ func refreshCells(cells []string) (err error) {
for _, cell := range cells {
err = inst.SaveCell(cell)
if err != nil {
log.Error(err)
log.Errorf("Failed to save cell %q: %+v", cell, err)
return err
}
updated[cell] = true
Expand All @@ -59,6 +59,7 @@ func refreshCells(cells []string) (err error) {
// be changing because we are holding a lock.
cells, err = inst.ReadCells()
if err != nil {
log.Errorf("Failed to read cells: %+v", err)
return err
}

Expand All @@ -69,7 +70,7 @@ func refreshCells(cells []string) (err error) {
}
log.Infof("Forgetting stale cell %q", cell)
if err = inst.DeleteCell(cell); err != nil {
return err
log.Errorf("Failed to delete cell %q: %+v", cell, err)
}
}
return nil
Expand Down
2 changes: 1 addition & 1 deletion go/vt/vtorc/logic/cell_discovery_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import (
"vitess.io/vitess/go/vt/vtorc/inst"
)

func TestRefreshAllCells(t *testing.T) {
func TestRefreshCells(t *testing.T) {
// Store the old flags and restore on test completion
oldTs := ts
defer func() {
Expand Down

0 comments on commit dcefb1f

Please sign in to comment.