-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Commit
Previously, the code for checking if sessions are alive supported non-RBR-encoded session IDs. However, in version 24.1, we removed this support without adding proper handling for invalid IDs, potentially leading to finalization failures during upgrades (if stale session IDs existed). This patch adds logic to treat invalid session IDs, which will allow upgrades to occur if stale session IDs exist.s Fixes: #127061 Release note: None
- Loading branch information
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
# Validate that invalid sessionID's are always | ||
# considered dead. | ||
subtest invalid_sessions | ||
|
||
# Legacy non-RBR format | ||
query B | ||
select crdb_internal.sql_liveness_is_alive(x'1f915e98f96145a5baa9f3a42c378eb6'); | ||
---- | ||
false | ||
|
||
# Wrong length | ||
query B | ||
select crdb_internal.sql_liveness_is_alive(x'deadbeef'); | ||
---- | ||
false | ||
|
||
subtest end | ||
|
||
|
||
subtest valid_sessions | ||
|
||
# Sanity: All sessions are alive in sqlliveness. | ||
query I | ||
SELECT count(*) FROM system.sqlliveness WHERE crdb_internal.sql_liveness_is_alive(session_id) = false; | ||
---- | ||
0 | ||
|
||
query B | ||
SELECT count(*) > 0 FROM system.sqlliveness WHERE crdb_internal.sql_liveness_is_alive(session_id) = true; | ||
---- | ||
true | ||
|
||
subtest end | ||
|
||
|
||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.