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] Table Creation Partially Fails #5413

Closed
hudclark opened this issue Aug 17, 2020 · 5 comments
Closed

[YSQL] Table Creation Partially Fails #5413

hudclark opened this issue Aug 17, 2020 · 5 comments
Assignees
Labels
area/ysql Yugabyte SQL (YSQL) community/request Issues created by external users kind/bug This issue is a bug priority/medium Medium priority issue

Comments

@hudclark
Copy link

hudclark commented Aug 17, 2020

Jira Link: DB-2390
YB Version: 2.2.0.0.

We are using a 18 node cluster. NOTE: 6 nodes are blacklisted from the others and have been 'dead' for at least 1 week.

All SQL commands were sent via ./bin/ysql

What happened

  1. From the ysql shell, issued a command
CREATE TABLE table_name (
  <schema>
);
  1. After about 30 seconds, received the error
ERROR:  Already present: [Already present (yb/consensus/retryable_requests.cc:241): Duplicate request]
  1. Running \dt does not show the new table
  2. The YugaByte dashboard does show the new table
  3. Retried the query
CREATE TABLE table_name (
  <schema>
);
  1. After 30 seconds, received the same error as before
  2. \dt does not show the new table
  3. The YugaByte dashboard shows two tables with the same name.
@nspiegelberg
Copy link
Contributor

@hudclark : As a workaround, you should be able to issue DROP TABLE table_name and then re-create in the latest version of 2.2. See issue #4710, the fix was issued 2 weeks ago, so ensure that you're on the latest 2.2 release.

@ddorian ddorian added the area/ysql Yugabyte SQL (YSQL) label Aug 19, 2020
@ddorian ddorian self-assigned this Aug 19, 2020
@ddorian ddorian added the community/request Issues created by external users label Aug 19, 2020
@ddorian
Copy link
Contributor

ddorian commented Aug 19, 2020

@hudclark

In the meantime, can you try ./bin/yb-admin delete_table_by_id <table_id> and try recreating ?

@hudclark
Copy link
Author

@ddorian / @nspiegelberg Thank you for the suggestions.

Since this is a database used in production, we're finalizing our disaster recovery playbook before running any more schema changes. I'm expecting to try out your suggestions and report back early next week.

@bmatican
Copy link
Contributor

@hudclark If by any chance this happens again, or if you still have the setup where it happened initially, it might also help if you could share two types of logs with us, to better understand what might have happened:

  • the postgres logs -- eg: yb-tserver/logs/postgres.* on the host you had connected to with your ysqlsh
  • the master leader logs -- eg: yb-master/logs/yb-master.INFO, on the host that was the master leader at that time

If you're not comfortable sharing those on the issue, also happy to connect on Slack!

@yugabyte-ci yugabyte-ci added kind/bug This issue is a bug priority/medium Medium priority issue labels Jun 9, 2022
@m-iancu
Copy link
Contributor

m-iancu commented Oct 25, 2022

Closing as duplicate of #13358 -- though this particular case might have been fixed already, the general cases are being addressed as part of that issue.

@m-iancu m-iancu closed this as completed Oct 25, 2022
@m-iancu m-iancu moved this to Done in YQL-beta Oct 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/ysql Yugabyte SQL (YSQL) community/request Issues created by external users kind/bug This issue is a bug priority/medium Medium priority issue
Projects
Status: Done
Development

No branches or pull requests

6 participants