Details
-
Bug
-
Status: Resolved
-
Low
-
Resolution: Fixed
-
None
-
None
-
Low
Description
To repro:
1. Open the cli
2. Create a keyspace:
create keyspace ks1 with placement_strategy = SimpleStrategy and strategy_options =
;
3. Update the keyspace:
update keyspace ks1 with strategy_options =
;
The output is:
[default@unknown] create keyspace ks1 with placement_strategy = SimpleStrategy and strategy_options =
{replication_factor:1};
8ecd5e16-e0f7-37e7-850e-38ee1a3a510e
Waiting for schema agreement...
... schemas agree across the cluster
[default@unknown] update keyspace ks1 with strategy_options =
;
857af387-6677-3e39-bdf6-e1132673c25b
Waiting for schema agreement...
... schemas agree across the cluster
org.apache.thrift.protocol.TProtocolException: Required field 'keyspace' was not present! Struct: describe_keyspace_args(keyspace:null)
[default@unknown]
The problem is that the patch in CASSANDRA-4052 assumes the CLI is authenticated to a working keyspace. getKSMetaData in executeUpdateKeySpace is called with keySpace, which is null.
Changing this to keyspaceName partially solves it, we now get:
[default@unknown] update keyspace ks1 with strategy_options =
{replication_factor:3};
Not authenticated to a working keyspace.
18d750fc-19d9-30f0-b8b9-18b2e4a0a0d4
Waiting for schema agreement...
... schemas agree across the cluster
Not authenticated to a working keyspace.
This comes from replayAssumptions in getKSMetaData.
It seems that the refresh code needs to be reworked slightly to not assume the CLI is authenticated to a keyspace.