Skip to content

Instantly share code, notes, and snippets.

View ZhouXing19's full-sized avatar
🤖

Jane Xing ZhouXing19

🤖
  • Cockorach Labs
  • Toronto, ON
  • 15:07 (UTC -05:00)
View GitHub Profile
diff --git a/testutils/oracle_query_res_process.go b/testutils/oracle_query_res_process.go
index b16b063..6ff294f 100644
--- a/testutils/oracle_query_res_process.go
+++ b/testutils/oracle_query_res_process.go
@@ -4,6 +4,7 @@ package testutils
import (
"database/sql"
+ "fmt"
"strings"
diff --git a/internal/sequencer/script/source_acceptor.go b/internal/sequencer/script/source_acceptor.go
index a427879..ec8409a 100644
--- a/internal/sequencer/script/source_acceptor.go
+++ b/internal/sequencer/script/source_acceptor.go
@@ -19,6 +19,7 @@ package script
import (
"context"
+ "github.com/cockroachdb/field-eng-powertools/stopper"
"github.com/cockroachdb/replicator/internal/script"
diff --git a/internal/sequencer/sequtil/lease_group.go b/internal/sequencer/sequtil/lease_group.go
index 69954bf..9f61fb5 100644
--- a/internal/sequencer/sequtil/lease_group.go
+++ b/internal/sequencer/sequtil/lease_group.go
@@ -53,6 +53,10 @@ func LeaseGroup(
names[idx] = fmt.Sprintf("sequtil.Lease.%s", table.Canonical().Raw())
}
+ if len(names) == 0 {
+ names = append(names, fmt.Sprintf("sequtil.Lease.%s", group.Name.Raw()))
diff --git a/verify/rowverify/rowverify.go b/verify/rowverify/rowverify.go
index 117eca8..8c0ef81 100644
--- a/verify/rowverify/rowverify.go
+++ b/verify/rowverify/rowverify.go
@@ -12,6 +12,7 @@ import (
"github.com/cockroachdb/molt/dbtable"
"github.com/cockroachdb/molt/rowiterator"
"github.com/cockroachdb/molt/verify/inconsistency"
+ "github.com/lib/pq/oid"
"github.com/rs/zerolog"
diff --git a/fetch/csv_pipe.go b/fetch/csv_pipe.go
index 200f86b..e586474 100644
--- a/fetch/csv_pipe.go
+++ b/fetch/csv_pipe.go
@@ -23,7 +23,7 @@ type csvPipe struct {
currRows int
numRows int
numRowsCh chan int
- newWriter func(numRowsCh chan int) io.WriteCloser
+ newWriter func(numRowsCh chan int) (io.WriteCloser, error)
1 glog
2 gau
3 gfix 8c63b92
4 git add -u
5 git rebase --continue
6 fixproxylint && make gen
7 docker rm -f $(docker ps -a -q)
8 docker run -d --name=roach5 --hostname=roach5 -p 26257:26257 -p 8080:8080 cockroachdb/cockroach:latest-v23.1 start-single-node --insecure
9 make run_orch
10 go run . mysql --bind-addr=0.0.0.0:9043 --metrics-addr=0.0.0.0:9044 \\n --init-source "mysql://root@tcp(localhost:3306)/defaultdb" \\n --init-target "postgresql://[email protected]:26257/defaultdb?sslmode=disable" \\n --logging=debug --shadow-mode=none
diff --git a/internal/proxyqlhandler/handler.go b/internal/proxyqlhandler/handler.go
index e15739b..c09ff3a 100644
--- a/internal/proxyqlhandler/handler.go
+++ b/internal/proxyqlhandler/handler.go
@@ -258,10 +258,10 @@ func (h *Handler) Handle(ctx context.Context, query string) (any, error) {
default:
return nil, errors.AssertionFailedf("unknown cutover command")
}
- h.fe.ResetForConsistentCutover()
if err != nil {
diff --git a/internal/frontend/frontend.go b/internal/frontend/frontend.go
index 3df0069..eb02d1c 100644
--- a/internal/frontend/frontend.go
+++ b/internal/frontend/frontend.go
@@ -66,6 +66,7 @@ type Frontend interface {
ListenForTraffic() Traffic
// HandleTraffic tells the frontend to handle the traffic sent.
HandleTraffic(ctx context.Context, traffic any) error
+ CheckIfTrafficCutover(traffic any) (bool, error)
PrepareResult(ctx context.Context, result Result) (any, error)
@ZhouXing19
ZhouXing19 / portal_vtable_test
Last active March 22, 2023 23:24
Running multiple active portals against query involving pg_catalog / information_schema / WITH RECURSIVE
send crdb_only
Query {"String": "SET CLUSTER SETTING sql.pgwire.multiple_active_portals.enabled = true"}
----
until crdb_only ignore=NoticeResponse
ReadyForQuery
----
{"Type":"CommandComplete","CommandTag":"SET CLUSTER SETTING"}
{"Type":"ReadyForQuery","TxStatus":"I"}
diff --git a/pkg/sql/conn_executor.go b/pkg/sql/conn_executor.go
index 9dfd019faa6..a2964ec1c1d 100644
--- a/pkg/sql/conn_executor.go
+++ b/pkg/sql/conn_executor.go
@@ -1047,11 +1047,11 @@ func (s *Server) newConnExecutor(
ex.extraTxnState.prepStmtsNamespace = prepStmtNamespace{
prepStmts: make(map[string]*PreparedStatement),
- portals: make(map[string]PreparedPortal),
+ portals: make(map[string]PortalWithMeta),