sql: use collection in zone config hydration#92035
sql: use collection in zone config hydration#92035craig[bot] merged 1 commit intocockroachdb:masterfrom
Conversation
9bae231 to
586676c
Compare
87135e3 to
d0dc347
Compare
postamar
left a comment
There was a problem hiding this comment.
This should probably be reviewed by @ajwerner who understands zone configs better than I do. I noticed a few things.
One thing I'm curious about is having the gossiped system config provide zone configs: is this necessary? I thought I heard at some point that we didn't gossip the system config any more.
@postamar sorry not familiar with this part, I'm curious that which change caused your curiosity on this? |
|
I'm curious to the possibility that the code relying on the |
Oh, I just looked at this a bit and some of the kv code to get span configs can still trace down to this. |
d0dc347 to
e579eaa
Compare
Can you spell the path out for me? |
@ajwerner here is an example path: cockroach/pkg/sql/zone_config.go Line 189 in 9fc656e cockroach/pkg/sql/zone_config.go Line 41 in 9fc656e cockroach/pkg/config/system.go Line 434 in 9fc656e cockroach/pkg/config/system.go Line 308 in 9fc656e cockroach/pkg/config/system.go Line 339 in 9fc656e cockroach/pkg/kv/kvserver/replica_command.go Line 3260 in 9fc656e |
|
Alrighty, I think I have a gift for you. We can remove a bunch of code. |
|
#92941 I'm certain there's some tests to spruce up, but I think it's legit. It'll wrap up a whole lot of work. h/t to @arulajmani and @irfansharif! |
e579eaa to
fd65b44
Compare
|
Let's merge this and then later delete the code. There's a lot of tests to fix up. |
ajwerner
left a comment
There was a problem hiding this comment.
Reviewed 13 of 27 files at r1, 4 of 7 files at r2, all commit messages.
Reviewable status:complete! 0 of 0 LGTMs obtained (waiting on @chengxiong-ruan and @postamar)
pkg/sql/catalog/descs/descriptor.go line 86 at r3 (raw file):
ctx context.Context, txn *kv.Txn, id descpb.ID, ) (catalog.TableDescriptor, error) { // Ignore ids with not descriptor.
nit: without a descriptor.
part of cockroachdb#88571 Previously, we use a `getKey` function (which is basically a kv lookup) to fetch zone configs and table descriptors required for zone config hydration. It has redundant work of deserializing protobufs done by descriptor collection. This commit change it to use a helper interface to lookup zoneconfig and descriptor directly. This also make sure that we ustilize in cache zone configs when possible. Release note: None
fd65b44 to
0c08f56
Compare
|
TFTR! |
|
👎 Rejected by code reviews |
|
@postamar still need you stamp because there was a change requested. Thanks. |
|
TFTR! |
|
Build succeeded: |
part of #88571
Previously, we use a
getKeyfunction (which is basically akv lookup) to fetch zone configs and table descriptors required
for zone config hydration. It has redundant work of deserializing
protobufs done by descriptor collection. This commit change it
to use a helper interface to lookup zoneconfig and descriptor
directly. This also make sure that we ustilize in cache zone configs
when possible.
Release note: None