go.mod: update to pgx v4.13#68608
Conversation
otan
left a comment
There was a problem hiding this comment.
some test failures but they look like you'd have to massage them differently, lgtm
knz
left a comment
There was a problem hiding this comment.
Reviewed 55 of 55 files at r1, all commit messages.
Reviewable status:complete! 0 of 0 LGTMs obtained (waiting on @adityamaru, @rafiss, and @stevendanna)
pkg/ccl/backupccl/backup_test.go, line 7297 at r1 (raw file):
db, err := pgx.ConnectConfig(ctx, connCfg) assert.NoError(t, err) defer func() { _ = db.Close(ctx) }()
assert.NoError(t, db.Close(ctxo))
pkg/workload/kv/kv.go, line 444 at r1 (raw file):
} defer func() { _ = tx.Rollback(ctx)
maybe assert the return value?
rafiss
left a comment
There was a problem hiding this comment.
Reviewable status:
complete! 0 of 0 LGTMs obtained (waiting on @adityamaru, @knz, and @stevendanna)
pkg/ccl/backupccl/backup_test.go, line 7297 at r1 (raw file):
Previously, knz (kena) wrote…
assert.NoError(t, db.Close(ctxo))
done
pkg/workload/kv/kv.go, line 444 at r1 (raw file):
Previously, knz (kena) wrote…
maybe assert the return value?
done
|
sqlproxy's Will debug later today or tomorrow. Update: This was failing because pgx now tries to resolve |
ba86c07 to
f99ce2a
Compare
|
@stevendanna if you have some time would you be able to help me with this? I'm trying to upgrade our pgx dependency to use v4 across the board, and I've encountered an issue in The test is getting stuck at this line: The reason is because the pgx v4 differs from the old pgx in that it immediately tries to fetch the result when running Do you have any other ideas on how to synchronize here while still achieving the goals of the test? The other option I thought of is to jump into a lower level and use |
|
I understand the test a bit better now so I tried to fix the test myself -- @stevendanna when you have a chance, please review the diff in |
rafiss
left a comment
There was a problem hiding this comment.
Reviewable status:
complete! 1 of 0 LGTMs obtained (waiting on @adityamaru, @knz, @rafiss, and @stevendanna)
pkg/ccl/changefeedccl/changefeed_test.go, line 2373 at r10 (raw file):
Previously, stevendanna (Steven Danna) wrote…
[nit] We could fail to clean up this feed if there are errors above in upsertRow() or forceTableGC.
in that case there would have already been a t.Fatal, or otherwise closeFeed itself will call t.Fatal
rafiss
left a comment
There was a problem hiding this comment.
Reviewable status:
complete! 1 of 0 LGTMs obtained (waiting on @adityamaru, @knz, @rafiss, and @stevendanna)
pkg/ccl/changefeedccl/changefeed_test.go, line 2373 at r10 (raw file):
Previously, rafiss (Rafi Shamim) wrote…
in that case there would have already been a t.Fatal, or otherwise
closeFeeditself will call t.Fatal
ah, i see your point. the execution could stop before reaching this defer. fixing it, nice catch!
This also required an update to cockroach-go/v2 to get the crdbpgx transaction retry helper. The majority of changes here are because pgx now requires the context to be passed in always. This revealed a bug in the COPY state machine. We were not handling errors during COPY correctly, so we now always continue reading until encountering a CopyDone message. Also, the way that pgx prepares statements has changed -- to disable automatic prepared statements, the PreferSimpleProtocol setting must be enabled when making the pgxpool. Finally, sqlproxy tests had to be modified since pgx now has more fallback logic to retry connections when using an sslmode of `prefer` or `allow`. Release note: None
This functionality is not supported by pgx any more. pgx will either use prepared statements or the simple protocol. Release note: None
Release note: None
|
thanks for the reviews all! bors r=otan,knz,stevendanna |
|
Build failed (retrying...): |
|
Build succeeded: |
In cockroachdb#68608 we upgraded to pgx v4.13, which changed some interface signatures to accept `context.Context`. The usage was updated almost everywhere, except some spots. Release note: None
In cockroachdb#68608 we upgraded to pgx v4.13, which changed some interface signatures to accept `context.Context`. The usage was updated almost everywhere, except some spots. Release note: None
72998: flowinfra: refactor locking around FlowRegistry r=yuzefovich a=yuzefovich **flowinfra: refactor locking around FlowRegistry** This commit refactors the locking done in `FlowRegistry`. Previously, the `FlowRegistry`'s mutex (global process-wide) was protecting three pieces of information: - `flows` map that stores which flows have already been scheduled on the node - `flowEntry` objects (information about each scheduled flow) - `InboundStreamInfo` objects (information about endpoints to serve `FlowStream` RPCs). This commit refactors the `InboundStreamInfo` objects so that each has its own mutex. This cleans up the things a bit and allows us more cleanly refactor the code in `ConnectInboundStream` so that we don't perform any gRPC calls (which might be blocking, rarely) while holding the `FlowRegistry`'s mutex. Fixes: #72964. Release note: None **flowinfra: remove the reference to waitGroup from InboundStreamInfo** This limits the coupling of `InboundStreamInfo` and `FlowBase`. Release note: None 73312: Fix compose tests r=rafiss a=rail In #68608 we upgraded to pgx v4.13, which changed some interface signatures to accept `context.Context`. The usage was updated almost everywhere, except some spots. This patch also fixes `defer` usage in a loop. Release note: None 73336: misc: add remote visual studio code support to gceworker r=cucaroach a=cucaroach gceworker.sh code will start the gceworker, touch /.active, start code and run a remote SSH to it. When code exits the .active will be removed. Release note: none 73339: cloud: bump orchestrator to v21.2.2 r=JuanLeon1 a=aliher1911 Release note: None 73345: roachtest: update 22.1 version map to v21.2.2 r=rail a=aliher1911 Release note: None Co-authored-by: Yahor Yuzefovich <yahor@cockroachlabs.com> Co-authored-by: Rail Aliiev <rail@iqchoice.com> Co-authored-by: Tommy Reilly <treilly@cockroachlabs.com> Co-authored-by: Oleg Afanasyev <oleg@cockroachlabs.com>
In #68608 we upgraded to pgx v4.13, which changed some interface signatures to accept `context.Context`. The usage was updated almost everywhere, except some spots. Release note: None
fixes #62840
This also required an update to cockroach-go/v2 to get the crdbpgx
transaction retry helper.
The majority of changes here are because pgx now requires the context to
be passed in always.
Other changes:
automatic prepared statements, the PreferSimpleProtocol setting must be
enabled when making the pgxpool.
nopreparesetting was removed fromworkload. This functionalityis not supported by pgx any more. pgx will either use prepared statements and
cache them automatically or use the simple protocol.
fallback logic to retry connections when using an sslmode of
preferor
allow. pgx also now tries to resolvelocalhostas the IPv6 address:::1, which isn't well-supported by sqlproxy, so IP resolution was disabledfor sqlproxy tests.
pgx.Conn.Querynow immediatelytries fetching the results, which didn't work with the synchronization that was added
to TestChangefeedDataTTL.
Release note: None