Skip to content

Commit 6a4f183

Browse files
committed
sql: avoid buffering notice for upgrading to SERIALIZABLE
This avoids flakiness in a test which expects the notice, but would sometimes not see it. Release note: None
1 parent 2c3b545 commit 6a4f183

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

pkg/sql/conn_executor_ddl.go

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,13 @@ func (ex *connExecutor) maybeAdjustTxnForDDL(ctx context.Context, stmt Statement
8282
return err
8383
}
8484
ex.extraTxnState.upgradedToSerializable = true
85-
p.BufferClientNotice(ctx, pgnotice.Newf("setting transaction isolation level to SERIALIZABLE due to schema change"))
85+
if err := p.SendClientNotice(
86+
ctx,
87+
pgnotice.Newf("setting transaction isolation level to SERIALIZABLE due to schema change"),
88+
false, /* immediateFlush */
89+
); err != nil {
90+
return err
91+
}
8692
} else {
8793
return txnSchemaChangeErr
8894
}

0 commit comments

Comments
 (0)