Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[YSQL] yb-admin create_database_snapshot should not require ysql prefix for database name #4991

Closed
ndeodhar opened this issue Jul 7, 2020 · 1 comment
Assignees
Labels
area/ysql Yugabyte SQL (YSQL)

Comments

@ndeodhar
Copy link
Contributor

ndeodhar commented Jul 7, 2020

Since we have split yb-admin snapshot commands for YCQL and YSQL into create_keyspace_snapshot and create_database_snapshot, we shouldn't need a ysql. prefix for create_database_snapshot.

Current behavior:

yb-admin -master_addresses 127.0.0.1:7100 create_database_snapshot test
Error: Invalid argument (yb/tools/yb-admin_cli_ent.cc:118): Wrong database type: YQL_DATABASE_CQL: 2 vs. 3

This should work and assume that test is of type YSQL instead of current assumption of YCQL.

@ndeodhar ndeodhar added the area/ysql Yugabyte SQL (YSQL) label Jul 7, 2020
hulien22 added a commit that referenced this issue Jul 27, 2020
…ix for database name (#4991)

Summary:
Adding option to specify default db type in ParseNamespaceName
 - if there is a prefix then we still respect it, otherwise default to `default_if_no_prefix`

Test Plan:
Running
```
yb-admin -master_addresses 127.0.0.1:7100 create_database_snapshot test
```
Should no longer produce any errors about wrong database types.

Reviewers: neha

Reviewed By: neha

Subscribers: yql

Differential Revision: https://phabricator.dev.yugabyte.com/D8858
@hulien22
Copy link
Contributor

Closed in 4cb2cc2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/ysql Yugabyte SQL (YSQL)
Projects
None yet
Development

No branches or pull requests

2 participants