-
Notifications
You must be signed in to change notification settings - Fork 1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[BACKPORT 2.16][#16135] YCQL: Use Metadata Cache in IsYBTableAltered
Summary: Before the fix `CQLStatement::IsYBTableAltered` always uses RPC to the Master to get up-to-date Table Schema Version. Now it's controlled by the new G-flag: `cql_use_metadata_cache_for_schema_version_check`. If the G-flag is `true` the internal TS Table Metadata Cache is used to get the Table Schema Version instead of the (potentially slow) RPC. The new G-flag `cql_use_metadata_cache_for_schema_version_check` is `false` by default. Note that `ParseTree::IsYBTableAltered` is used in 2 code points: 1. In `Executor::ProcessStatementStatus` 2. In `CQLStatement::IsYBTableAltered` `CQLStatement::IsYBTableAltered` is called from the `PREPARE` request handling - in `CQLServiceImpl::AllocatePreparedStatement`. The new flag affects only `CQLStatement::IsYBTableAltered`. `Executor::ProcessStatementStatus` remains unchanged. Original diff: D22686 / 9bd9bb8 GH link: 9bd9bb8 Test Plan: New tests: ybd --java-test org.yb.cql.TestPrepareExecute#testAlterAdd_UseMetadataCache ybd --java-test org.yb.cql.TestPrepareExecute#testAlterAdd_MetadataInExecResp_UseMetadataCache Other tests for PREPARE/EXECUTE: ybd --java-test org.yb.cql.TestPrepareExecute#testAlterAdd ybd --java-test org.yb.cql.TestPrepareExecute#testAlterAdd_MetadataInExecResp ybd --java-test org.yb.cql.TestPrepareExecute#testAlterDropAdd ybd --java-test org.yb.cql.TestPrepareExecute#testAlterDropAddSameSizeType ybd --java-test org.yb.cql.TestPrepareExecute#testMultiThreadedAlterAdd --tp 1 ybd --java-test org.yb.cql.TestPrepareExecute#testMultiThreadedAlterDropAdd ybd --java-test org.yb.cql.TestPrepareExecute#testRecreateTable ybd --cxx-test cql-test --gtest_filter CqlTest.AlteredPrepare ybd --cxx-test cql-test --gtest_filter CqlTest.AlteredPrepare_MetadataInExecResp ybd --cxx-test cql-test --gtest_filter CqlTest.AlteredPrepareWithPaging ybd --cxx-test cql-test --gtest_filter CqlTest.AlteredPrepareWithPaging_NoSchemaCheck ybd --cxx-test cql-test --gtest_filter CqlTest.AlteredPrepareWithPaging_MetadataInExecResp ybd --cxx-test cql-test --gtest_filter CqlTest.PrepareWithDropTableWithPaging ybd --cxx-test cql-test --gtest_filter CqlTest.PrepareWithDropTableWithPaging_NoSchemaCheck Reviewers: mihnea, stiwary, neil Reviewed By: neil Subscribers: yql, kgupta Differential Revision: https://phabricator.dev.yugabyte.com/D23065
- Loading branch information
1 parent
3de76bb
commit b2b1cdf
Showing
9 changed files
with
86 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters