sqlliveness/slstorage: break InternalExecutor depedency#65648
Conversation
9553254 to
7956dbd
Compare
knz
left a comment
There was a problem hiding this comment.
Change LGTM, but CI is telling you that there are now a couple of dead functions that you should remove.
Reviewed 4 of 4 files at r1, 2 of 2 files at r2.
Reviewable status:complete! 0 of 0 LGTMs obtained (waiting on @ajwerner)
pkg/sql/sqlliveness/slstorage/slstorage_test.go, line 64 at r2 (raw file):
tDB.Exec(t, schema) var tableID descpb.ID tDB.QueryRow(t, "SELECT $1::regclass::int",
that regclass cast under the hood recurses into a lot of subsystems. There's a lot of opportunity for things to go wrong.
What about
select u.id
from system.namespace t
join system.namespace u
on t.id = u."parentID"
where t.name = $1 and u.name = 'sqlliveness'with dbName as argument
pkg/sql/sqlliveness/slstorage/slstorage_test.go, line 319 at r2 (raw file):
tDB.Exec(t, schema) var tableID descpb.ID tDB.QueryRow(t, "SELECT $1::regclass::int",
ditto
7956dbd to
6628800
Compare
There was no fundamental reason to rely on SQL for this low-level subsystem. Release note: None
6628800 to
686f323
Compare
ajwerner
left a comment
There was a problem hiding this comment.
Reviewable status:
complete! 0 of 0 LGTMs obtained (waiting on @knz)
pkg/sql/sqlliveness/slstorage/slstorage_test.go, line 64 at r2 (raw file):
Previously, knz (kena) wrote…
that regclass cast under the hood recurses into a lot of subsystems. There's a lot of opportunity for things to go wrong.
What about
select u.id from system.namespace t join system.namespace u on t.id = u."parentID" where t.name = $1 and u.name = 'sqlliveness'with
dbNameas argument
Done.
knz
left a comment
There was a problem hiding this comment.
Reviewed 5 of 5 files at r3.
Reviewable status:complete! 0 of 0 LGTMs obtained (waiting on @ajwerner)
|
will appreciate a backport to 21.1 |
|
TFTR! bors r=knz |
|
Build succeeded: |
There was no fundamental reason to rely on SQL for this low-level subsystem.
Release note: None