Uploaded image for project: 'Cassandra'
  1. Cassandra
  2. CASSANDRA-4052

Add way to force the cassandra-cli to refresh it's schema

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Low
    • Resolution: Fixed
    • 1.1.1
    • Legacy/Tools

    Description

      By design, the cassandra-cli caches the schema and doesn't refresh it when various commands like "describe keyspaces" are run. This is reasonable, and it is easy enough to restart the cli if necessary. However, this does lead to confusion since a new user can reasonably assume that describe keyspaces will always show an accurate current represention of the ring. We should find a way to reduce the surprise (and lack of easy discoverability) of this behaviour.

      I propose any one of the following(#1 is probably the easiest and most likely):
      1) Add a command (that would be documented in the cli's help) to explicitly refresh the schema ("schema refresh", "refresh schema", or anything similar).
      2) Always force a refresh of the schema when performing at least the "describe keyspaces" command.
      3) Add a flag to cassandra-cli to explicitly enable schema caching. If that flag is not passed, then schema caching will be disabled for that session. This suggestion assumes that for simple deployments (few CFs, etc), schema caching isn't very important to the performance of the cli.

      Attachments

        1. 4052_refresh_schema_1.1_branch.diff
          13 kB
          Dave Brosius
        2. 4052_refresh_schema.diff
          13 kB
          Dave Brosius

        Activity

          People

            dbrosius David Brosius
            tupshin Tupshin Harper
            David Brosius
            Pavel Yaskevich
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: