-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[#9683] Automatic updating of Cassandra client (ycqlsh) internal meta…
…data cache. Summary: Implemented automatic internal cache update in case of an internal 'not found' error. The cache updating is automatic & invisible. To see when the cache is updated - start the tool with `--debug` argument: ``` ycqlsh 127.0.0.3 --debug ``` Generic requests (like `DESC TABLES`, `DESC <keyspace>`) will NOT show updated information till e.g. the info will be updated via the `DESC <table>` request, which initiates the internal cache refreshing. The new command line argument `--refresh_on_describe` (or `-r`) can be used to force the cache refreshing on every `DESC` command. ``` ycqlsh 127.0.0.3 --refresh_on_describe ``` The new function `refresh_schema_metadata(self, fn_to_rerun, args, ex)` after the metadata refreshing must automatically rerun the function-caller: `fn_to_rerun(*args)`. If a recursive call detected, the exception will be raised (actually it's an old exception from the original implementation before the fix.) Automatic rerun of the caller helps too keep main part of the code unchanged. Test Plan: In terminal 1: CREATE KEYSPACE a; CREATE TABLE t (h INT PRIMARY KEY); In terminal 2: SELECT * FROM a.t; or INSERT INTO a.t (h) VALUES (1); or DROP TABLE a.t; or DESC a.t or DESC a Reviewers: mihnea, pjain Reviewed By: pjain Subscribers: yql Differential Revision: https://phabricator.dev.yugabyte.com/D12972
- Loading branch information
1 parent
fc375bf
commit 4e00848
Showing
1 changed file
with
57 additions
and
16 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