You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Now, if you go to master UI, you'll see two tables with the name test.
This issue will get fixed once we have background job in master to delete such inconsistencies (rather the window during which the extra tables will exist will reduce). However, we should check if we can reorder the table creation process in YSQL such that table is created on master after constraint and sanity checks are done in postgres.
The text was updated successfully, but these errors were encountered:
…table creation on yb-master
Summary:
This diff addresses 2 issues:
1. #3503 Speed up table creation by buffering writes to postgres system tables.
This **reduces write RPCs from 54 to 13.** We can't reduce this further for now because the writes are interleaved with reads.
Note that we still have 53 read RPCs generated to master due to postgres cache invalidation during DDL execution.
In yb-ctl RF=1 on mac, this change **reduced table creation time from ~115 ms to ~70 ms.**
2. #4013 Reorder table creation on yb-master
We now create table on master after we've created the table in pg_class system table. This ensures that simple condition checks like table name already exists etc. are done **before** the table is created on yb-master, thereby preventing duplicate tables on yb-master.
Test Plan:
Manual testing
Jenkins
Reviewers: alex, mihnea
Reviewed By: mihnea
Subscribers: hector, kannan, yql
Differential Revision: https://phabricator.dev.yugabyte.com/D8196
If we create a duplicate table, then YSQL returns an error saying that table already exists, but yb master creates the table. For example:
Now, if you go to master UI, you'll see two tables with the name
test
.This issue will get fixed once we have background job in master to delete such inconsistencies (rather the window during which the extra tables will exist will reduce). However, we should check if we can reorder the table creation process in YSQL such that table is created on master after constraint and sanity checks are done in postgres.
The text was updated successfully, but these errors were encountered: