sql+pgwire: Fix contexts in sql and pgwire.#10094
Conversation
|
Can you help investigate? The acceptance tests are failing with Never saw this before. |
|
I haven't looked at anything, but I believe that acceptance error means that a node has crashed. We have some magic listening to docker container events 8-) |
|
Great, thanks! LGTM modulo one typo. Reviewed 1 of 2 files at r1, 5 of 5 files at r2. pkg/server/server.go, line 471 at r2 (raw file):
can init this once, before running pkg/server/server.go, line 472 at r2 (raw file):
s/ctx/pgCtx. Maybe just use pkg/sql/session.go, line 379 at r1 (raw file):
maybe name pkg/sql/pgwire/v3.go, line 653 at r2 (raw file):
We should probably pass Comments from Reviewable |
9936a72 to
4b4562e
Compare
|
Review status: 1 of 6 files reviewed at latest revision, 4 unresolved discussions. pkg/server/server.go, line 471 at r2 (raw file):
|
|
Review status: 1 of 6 files reviewed at latest revision, 2 unresolved discussions, some commit checks failed. pkg/server/server.go, line 472 at r3 (raw file):
shouldn't this be pkg/sql/pgwire/v3.go, line 653 at r2 (raw file):
|
4b4562e to
7d259b6
Compare
7d259b6 to
3f29d40
Compare
|
TFYR! |
|
I've not been able to test because I can't get cockroach to build: Are there nightly build available anywhere? |
|
Which platform are you building for? |
|
Ubuntu 14.04 x86_64. Used to docker container to run the build |
|
@alamaison RocksDB 4.9 changed some APIs we're using. We currently use RocksDB 4.8. This is all supposed to work automagically via |
|
|
|
Thanks. P.S. I meant to comment on #10087 but accidentally posted here instead |
|
pkg/server/server.go, line 470 at r4 (raw file):
If this is the only place we are using Comments from Reviewable |
|
@RaduBerinde perhaps, but I was following the comments next to the definition of AmbientContext, which was instructing me to "plumb AmbientContext to all the servers". Perhaps we could talk about why we would want multiple ambient contexts as opposed to a single one? |
|
We want multiple contexts because each layer's ambient context can add tags (and other stuff) to the parent's (server has The intention is to be embedded in servers/components that use it, in our case it's the |
I need this for #9259 and also I wanted to get protocol errors logged with the remote address properly.
This change is