Skip to content

Commit

Permalink
Fix TestReplicaTransactions assertion
Browse files Browse the repository at this point in the history
Signed-off-by: Florent Poinsard <florent.poinsard@outlook.fr>
  • Loading branch information
frouioui committed Feb 12, 2025
1 parent 5ea8a96 commit ebe6aab
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
1 change: 0 additions & 1 deletion go/test/endtoend/tabletgateway/vtgate_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,6 @@ func TestReplicaTransactions(t *testing.T) {
require.NoError(t, err)
serving := replicaTablet.VttabletProcess.WaitForStatus("SERVING", 60*time.Second)
assert.Equal(t, serving, true, "Tablet did not become ready within a reasonable time")
utils.AssertContainsError(t, readConn, fetchAllCustomers, "not found")

// create a new connection, should be able to query again
readConn, err = mysql.Connect(ctx, &vtParams)
Expand Down
12 changes: 6 additions & 6 deletions go/vt/vtgate/buffer/shard_buffer.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,14 @@ import (
"time"

"vitess.io/vitess/go/vt/discovery"

"vitess.io/vitess/go/vt/vtgate/errorsanitizer"

"vitess.io/vitess/go/vt/log"
"vitess.io/vitess/go/vt/logutil"
topodatapb "vitess.io/vitess/go/vt/proto/topodata"
"vitess.io/vitess/go/vt/topo/topoproto"
"vitess.io/vitess/go/vt/vterrors"
"vitess.io/vitess/go/vt/vtgate/errorsanitizer"

topodatapb "vitess.io/vitess/go/vt/proto/topodata"
)

// bufferState represents the different states a shardBuffer object can be in.
Expand Down Expand Up @@ -488,7 +489,7 @@ func (sb *shardBuffer) recordKeyspaceEvent(alias *topodatapb.TabletAlias, stillS
sb.mu.Lock()
defer sb.mu.Unlock()

log.V(2).Infof("disruption in shard %s/%s resolved (serving: %v), movetable state %#v",
log.Infof("disruption in shard %s/%s resolved (serving: %v), movetable state %#v",
sb.keyspace, sb.shard, stillServing, keyspaceEvent.MoveTablesState)

if !topoproto.TabletAliasEqual(alias, sb.currentPrimary) {
Expand Down Expand Up @@ -551,8 +552,7 @@ func (sb *shardBuffer) stopBufferingLocked(reason stopReason, details string) {
utilizationSum.Add(sb.statsKey, utilMax)
}

sb.
sb.logErrorIfStateNotLocked(stateBuffering)
sb.logErrorIfStateNotLocked(stateBuffering)
sb.state = stateDraining
q := sb.queue
// Clear the queue such that remove(), oldestEntry() and evictOldestEntry()
Expand Down

0 comments on commit ebe6aab

Please sign in to comment.