Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[#21229] YSQL: Validate pggate capability before sending scanned rows.
Summary: It has been reported that upgrades from 2.14/2.16 to 2.20 (and beyond) fail due to pggate going into a crash loop upon unpacking `PgsqlResponsePB`. This is caused due to the introduction of the 'Scanned Rows' field in 2.20+ (D31111) which is sent in its own RPC metrics sidecar. Versions of pggate lower than 2.17.1 are not capable of unpacking response protos that contain RPC sidecars holding data other than the rows returned by DocDB. During an upgrade, while an un-upgraded pggate may send a request only to its local un-upgraded tserver, it may have responses proxied back from upgraded tservers on other nodes. Thus, the RPC infrastructure needs to be forward compatible in order to ensure that pggate is not broken during upgrades. This revision introduces a guardrail to check that the receiving pggate is capable of unpacking the RPC metrics sidecar before sending the 'Scanned Rows' count. Required backports: 2.20 (original diff + this fix), 2024.1 (only this fix), 2.21 (if needed, depending on branching) Jira: DB-10156 Test Plan: Run rolling upgrade itest from 2.14/2.16 to master, 2.20.x, 2.21.x, 2024.1 Reviewers: hsunder, esheng, sergei Reviewed By: hsunder Subscribers: ybase, yql, mihnea, smishra Tags: #jenkins-ready Differential Revision: https://phorge.dev.yugabyte.com/D33503
- Loading branch information