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
Schema reads, caused e.g. by ReloadSchema() or explicitly by VReplication upon start of new workflow (via buildColInfoMap) run into the following race condition:
we construct a GetSchemaRequest message
the schema analysis, performed by Mysqld, first lists all tables
then, table by table, it runs SHOW CREATE TABLE ...
and depending on TableSchemaOnly, also SELECT ... FROM INFORMATION_SCHEMA.COLUMNS ... to read column info for said table
However, it is possible for a table to be dropped right after step (2) and before (3) or (4), in which case the schema analysis results with an error.
Such a scenario is frequently reproduced in onlineddl_vrepl endtoend test; the trigger is for TableGC to drop the "right" table at the "right time". As it happens onlineddl_vrepl causes that scenario more often than not, in one of its PRS operations.
While the bug is not limited to GC tables, those tables are low hanging fruit. They should be ignored by the schema analysis, just as they are ignored by many other internal operations. Specifically, no one is interested in SELECTing from _vt_(HOLD|PURGE|EVAC|DROP)... tables. In fact, _vt_HOLD_* is the only table that has any potential to be restored to production, and that, too, only after RENAME. And the rest of the tables are just on the long path to getting destroyed.
And so a simple and immediate first step if for VReplication to exclude, ie ignore, all GC tables when doing schema analysis. (they are also already ignored by vplayer anyway).
Reproduction Steps
Binary Version
-
Operating System and Environment details
-
Log Fragments
No response
The text was updated successfully, but these errors were encountered:
Overview of the Issue
Schema reads, caused e.g. by
ReloadSchema()
or explicitly by VReplication upon start of new workflow (viabuildColInfoMap
) run into the following race condition:GetSchemaRequest
messageMysqld
, first lists all tablesSHOW CREATE TABLE ...
TableSchemaOnly
, alsoSELECT ... FROM INFORMATION_SCHEMA.COLUMNS ...
to read column info for said tableHowever, it is possible for a table to be dropped right after step (2) and before (3) or (4), in which case the schema analysis results with an error.
Such a scenario is frequently reproduced in
onlineddl_vrepl
endtoend test; the trigger is for TableGC to drop the "right" table at the "right time". As it happensonlineddl_vrepl
causes that scenario more often than not, in one of its PRS operations.While the bug is not limited to GC tables, those tables are low hanging fruit. They should be ignored by the schema analysis, just as they are ignored by many other internal operations. Specifically, no one is interested in
SELECT
ing from_vt_(HOLD|PURGE|EVAC|DROP)...
tables. In fact,_vt_HOLD_*
is the only table that has any potential to be restored to production, and that, too, only afterRENAME
. And the rest of the tables are just on the long path to getting destroyed.And so a simple and immediate first step if for VReplication to exclude, ie ignore, all GC tables when doing schema analysis. (they are also already ignored by vplayer anyway).
Reproduction Steps
Binary Version
Operating System and Environment details
Log Fragments
No response
The text was updated successfully, but these errors were encountered: