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] Unable to set new namespace name while importing snapshot #2582

Closed
d-uspenskiy opened this issue Oct 11, 2019 · 0 comments
Closed

[YSQL] Unable to set new namespace name while importing snapshot #2582

d-uspenskiy opened this issue Oct 11, 2019 · 0 comments
Assignees
Projects

Comments

@d-uspenskiy
Copy link
Contributor

yb_admin allows to set new namespace and table name while importing snapshot

 33. import_snapshot <file_name> [<keyspace> <table_name> [<keyspace> <table_name>]...]

But command fails with error

2019-10-10 22:28:08,333 [INFO] from com.yugabyte.yw.common.ShellProcessHandler in TaskPool-BackupUniverse(f4cb6027-57ba-497a-8ad2-1b6c032d17c0)-0 - I1010 22:26:50.254976  3562 mem_tracker.cc:252] MemTracker: soft memory limit is 2.505337 GB
2019-10-10 22:28:08,334 [INFO] from com.yugabyte.yw.common.ShellProcessHandler in TaskPool-BackupUniverse(f4cb6027-57ba-497a-8ad2-1b6c032d17c0)-0 - I1010 22:26:50.259503  3562 yb-admin_client.cc:1205] Resolving namespace id for 'ybdemo_keyspace' of type 'ycql'
2019-10-10 22:28:08,334 [INFO] from com.yugabyte.yw.common.ShellProcessHandler in TaskPool-BackupUniverse(f4cb6027-57ba-497a-8ad2-1b6c032d17c0)-0 - Error: Not found (yb/tools/yb-admin_client.cc:1214): Namespace 'ybdemo_keyspace' of type 'ycql' not found

Solution: yb_admin should not try to find namespace id by name while processing import_snapshot command. As it is valid to specify new namespace name which is not yet existed on cluster. New namespace with provided name will be created in this case.

@d-uspenskiy d-uspenskiy self-assigned this Oct 11, 2019
@d-uspenskiy d-uspenskiy added this to To do in YSQL via automation Oct 11, 2019
@d-uspenskiy d-uspenskiy moved this from To do to In progress in YSQL Oct 16, 2019
d-uspenskiy added a commit that referenced this issue Oct 16, 2019
…in command

Summary:
`yb_admin` allows to set new namespace and table name while importing snapshot.
As a result `yb_admin` should not try to find namespace id by name while processing `import_snapshot` command.
As it is valid to specify new namespace name which is not yet existed on cluster.
New namespace with provided name will be created in this case.

Test Plan:
New test cases were introduced
```
./yb_build.sh --cxx-test yb-admin-test_ent
```

Reviewers: bogdan, oleg

Reviewed By: oleg

Subscribers: yql

Differential Revision: https://phabricator.dev.yugabyte.com/D7388
YSQL automation moved this from In progress to Done Oct 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
YSQL
  
Done
Development

No branches or pull requests

1 participant