You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
144594: roachtest: add TPC-C 1000 WH nowait test r=tbg a=ajstorm
We currently have a TPC-C nowait test in roachperf, but it's a one warehouse test, which isn't very realistic. This commit adds a more realistic test where we won't be contending on a single warehouse.
Epic: none
Release note: none
144642: backup: compaction dist sql processor now handles errors correctly r=msbutler a=kev-cao
Previously, when one of the processor nodes in the backup compaction dist SQL plan ran into an error, the compaction job would continue on, blissfully unaware of the error. This would result in faulty job successes. This patch fixes the coordinator node so that errors from other nodes is properly handled and surfaced.
Epic: None
Release note: None
144702: schemachanger: when taking a vector index offline, notify client r=rafiss a=mw5h
A previous patch disabled mutations on vector indexes if sql_safe_updates was enabled. This patch send the associated error message as a notice even if sql_safe_updates is disabled, so there are no surprises.
Informs: #144443
Release note (sql change): CREATE VECTOR INDEX and ALTER PRIMARY KEY will now send a notice that vector indexes will be offline during the change operation when sql_safe_updates is disabled.
Co-authored-by: Adam Storm <[email protected]>
Co-authored-by: Kevin Cao <[email protected]>
Co-authored-by: Matt White <[email protected]>
// Check if sql_safe_updates is enabled and the table has vector indexes
58
-
ifp.EvalContext().SessionData().SafeUpdates {
59
-
for_, idx:=rangetableDesc.AllIndexes() {
60
-
ifidx.GetType() ==idxtype.VECTOR {
61
-
returnpgerror.DangerousStatementf("ALTER PRIMARY KEY on a table with vector indexes will disable writes to the table while the index is being rebuilt")
62
-
}
58
+
iflen(tableDesc.VectorIndexes()) >0 {
59
+
ifp.EvalContext().SessionData().SafeUpdates {
60
+
returnpgerror.DangerousStatementf("ALTER PRIMARY KEY on a table with vector indexes will disable writes to the table while the index is being rebuilt")
61
+
} else {
62
+
p.BufferClientNotice(ctx, pgnotice.Newf("ALTER PRIMARY KEY on a table with vector indexes will disable writes to the table while the index is being rebuilt"))
panic(pgerror.DangerousStatementf("ALTER PRIMARY KEY on a table with vector indexes will disable writes to the table while the index is being rebuilt"))
70
+
} elseif!noticeSent {
71
+
noticeSender:=b.EvalCtx().ClientNoticeSender
72
+
noticeSender.BufferClientNotice(b, pgnotice.Newf("ALTER PRIMARY KEY on a table with vector indexes will disable writes to the table while the index is being rebuilt"))
73
+
noticeSent=true
68
74
}
69
-
})
70
-
}
75
+
}
76
+
})
71
77
72
78
// Panic on certain forbidden `ALTER PRIMARY KEY` cases (e.g. one of
73
79
// the new primary key column is a virtual column). See the comments
panic(pgerror.DangerousStatementf("CREATE VECTOR INDEX will disable writes to the table while the index is being built"))
47
+
ifn.Type==idxtype.VECTOR {
48
+
ifb.EvalCtx().SessionData().SafeUpdates {
49
+
panic(pgerror.DangerousStatementf("CREATE VECTOR INDEX will disable writes to the table while the index is being built"))
50
+
} else {
51
+
b.EvalCtx().ClientNoticeSender.BufferClientNotice(b, pgnotice.Newf("CREATE VECTOR INDEX will disable writes to the table while the index is being built"))
0 commit comments