Closed luqun closed 3 months ago
Can you explain why exactly is the new
DD_PROPERTIES
entry required? Would the following work without it?
- Handle DD tables first, as usual
- Go through all the system tables, if engine != dd engine, do
ALTER TABLE
To me this looks crash-safe too, unless I'm missing something.
Yes, it is crash-safe and also quick restart. For quick restart, in order to detect whether we need to run alter tables during restart, either check all SYSTEM tables or add a mark to record state
Yes, it is crash-safe and also quick restart. For quick restart, in order to detect whether we need to run alter tables during restart, either check all SYSTEM tables or add a mark to record state
Checking this property for SYSTEM tables should be cheap (they will be in the DD cache). I am a bit worried that a new DD_PROPERTIES
will complicate things (i.e. have to delete it on MyRocks -> InnoDB DDSE change), but if you prefer this approach, it's OK.
(i.e. have to delete it on MyRocks -> InnoDB DDSE change)
I think we can keep these variables even for MyRocks->INNODB DDSE change. I agree that remove these variables will be tricky during that DDSE change.
@laurynas-biveinis , would you take a look again? just rebase with your latest change. also use script to upgrade these system tables.
I believe we have to fully think through user-issued ALTER TABLE mysql.systable ENGINE=anything
support.
With your approach, or with previously-suggested my one, or, I believe, with any
approach in the server, any ALTER TABLE
that changes engine away from the
default_dd_system_storage_engine
will be either ignored (good for user who
issued it but bad for the idea behind this PR), either reverted (good for this
PR, bad for the user).
I see two ways out of this:
default_dd_system_storage_engine
applies to new
instances only, handle any InnoDB <-> MyRocks changing at user level,
effectively dropping this PRALTER TABLE mysql.* ENGINE = not-default-dd-system-one
.
This should be done in this PR too then.What do you think?
What do you think?
Discuss offline and we believe we should disable "alter table system tables into non-DDSE" for users to keep simple. All DD Tables and SYSTEMS Tables always use DDSE.
@laurynas-biveinis , now it is ready for review.. :)
Resolved all comments and also add a new variables skip-sys-tables-engine-check, since some MTRs alter system table to myiasm engine.
also add a new variables skip-sys-tables-engine-check, since some MTRs alter system table to myiasm engine.
Since we will never be changing system table engine to MyISAM, can we just disable those testcases instead?
also add a new variables skip-sys-tables-engine-check, since some MTRs alter system table to myiasm engine.
Since we will never be changing system table engine to MyISAM, can we just disable those testcases instead?
Problem is that these testcase also test other scenarios in same time..maybe a new global variable is better..
luqun @.***> writes:
yep. it complains Static_cast from 'legacy_db_type ' to 'uint ' (aka 'unsigned int *') is not allowed.
Right, it's pointers. OK to leave as-is.
luqun @.***> writes:
also add a new variables skip-sys-tables-engine-check, since some MTRs alter system table to myiasm engine.
Since we will never be changing system table engine to MyISAM, can we just disable those testcases instead?
Problem is that these testcase also test other scenarios in same time..maybe a new global variable is better..
Can you list those tests?
If they happen to be debug-only, then we can piggyback on
+d,skip_dd_table_access_check
. The debug injection name is not a
perfect match, but it would suffice IMHO.
Can you list those tests? If they happen to be debug-only, then we can piggyback on
+d,skip_dd_table_access_check
. The debug injection name is not a perfect match, but it would suffice IMHO. There is only 1 debug only test..
mysql-test/suite/perfschema/t/error_log.test mysql-test/t/system_tables_myisam.test mysql-test/t/system_tables_myisam_lctn_1.test mysql-test/t/transactional_acl_tables.test mysql-test/suite/auth_sec/t/atomic_rename_user.test mysql-test/t/dd_schema_dd_properties_debug.test
mysql-test/suite/perfschema/t/error_log.test mysql-test/t/system_tables_myisam.test mysql-test/t/system_tables_myisam_lctn_1.test mysql-test/t/transactional_acl_tables.test mysql-test/suite/auth_sec/t/atomic_rename_user.test mysql-test/t/dd_schema_dd_properties_debug.test
I see. It would require some effort to split these tests into MyISAM and non-MyISAM parts, feel free to go ahead with the new sysvar or split the tests as you see best
@luqun has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.
This pull request has been merged in facebook/mysql-5.6@f73d8f48babd49778e588bf88f2e3647c22776d4.
Summary:
During mysqld version changes, it call upgrade_system_schemas() to upgrade SYSTEM tables. During DDSE change, It will also call upgrade_system_schemas() to upgrade these SYSTEM tables.
One question is how to "reliability" upgrade SYSTEM tables during DDSE change(upgrade SYSTEM tables occurs after DD_ENGINE properties has been changed to target DDSE):
Details:
The change has several assumptions:
Test Plan:
Reviewers:
Subscribers:
Tasks:
Tags:
Differential Revision: https://phabricator.intern.facebook.com/D51085626