-
Notifications
You must be signed in to change notification settings - Fork 713
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
FB8-87, FB8-119: Supporting dynamic scheduling in MTS #999
Conversation
# This test verifies the functionality of slave_db_load table. | ||
|
||
source include/master-slave.inc; | ||
source include/have_debug.inc; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
swap these 2 includes
source include/have_debug.inc; | ||
|
||
let rpl_server_number=2; | ||
source include/rpl_restart_server.inc; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably,
source include/rpl_stop_server.inc;
is we are starting in at line 15?
let rpl_server_number=2; | ||
source include/rpl_restart_server.inc; | ||
|
||
connection slave; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
connection slave; | |
source include/rpl_connection_slave.inc; |
set global mts_dynamic_rebalance=TRUE; | ||
set global slave_parallel_workers=2; | ||
set global debug="+d,skip_checkpoint_load_reset"; | ||
start slave; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
start slave; | |
source include/start_slave.inc |
# Load should be empty | ||
select * from information_schema.slave_db_load; | ||
|
||
connection master; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
connection master; | |
source include/rpl_connection_master.inc; |
sql/sql_parse_com_rpc.cc
Outdated
|
||
void srv_session_end_statement(Srv_session* session) {} | ||
|
||
#endif // #ifndef EMBEDDED_LIBRARY |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No EMBEDDED_LIBRARY in 8.0
sql/sql_parse_com_rpc.h
Outdated
@@ -0,0 +1,11 @@ | |||
#pragma once |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#pragma once
is a non-standard extension. Use standard #define header guards.
sql/rpl_rli_pdb.h
Outdated
|
||
worker_load(Slave_worker *worker) : worker_load(worker, 0) {} | ||
|
||
bool operator>(const worker_load &other) const { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
bool operator>(const worker_load &other) const { | |
bool operator>(const worker_load &other) const noexcept { |
sql/sql_show.cc
Outdated
continue; | ||
} | ||
|
||
mysql_mutex_lock(&rli->slave_worker_hash_lock); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Formatting (indentation)
sql/rpl_rli_pdb.cc
Outdated
if (new_max_wrk_load < wrk_load.load) new_max_wrk_load = wrk_load.load; | ||
total_wrk_load += entry.second->load; | ||
|
||
heap.push(wrk_load); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
heap.push(wrk_load); | |
heap.emplace(std::move(wrk_load)); |
Updated. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@hermanlee has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think a number of tests like main.information_schema_* need to be re-recorded since SLAVE_DB_LOAD was added.
main.information_schema_db
main.information_schema_cs
There might be some ci ones too?
@@ -2599,7 +2599,9 @@ void Relay_log_info::clear_relay_log_truncated() { | |||
} | |||
|
|||
bool Relay_log_info::is_time_for_mts_checkpoint() { | |||
if (is_parallel_exec() && opt_mts_checkpoint_period != 0) { | |||
bool period_check = opt_mts_checkpoint_period != 0 && | |||
!curr_group_seen_begin && !curr_group_seen_gtid; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I seem to be seeing a ubsan runtime issue here:
../../sql/rpl_rli.cc:2603:50: runtime error: load of value 86, which is not a valid value for type 'bool'
#0 0x6ac5253 in Relay_log_info::is_time_for_mts_checkpoint() sql/rpl_rli.cc:2603:50
#1 0x6a66fa0 in exec_relay_log_event(THD*, Relay_log_info*, Rpl_applier_reader*) sql/rpl_slave.cc:4696:23
#2 0x6a3b883 in handle_slave_sql sql/rpl_slave.cc:6826:9
#3 0x81047da in pfs_spawn_thread(void*) storage/perfschema/pfs.cc:2836:3
#4 0x7f63b9ff966d in start_thread (/usr/local/fbcode/platform007/lib/libpthread.so.0+0x766d)
#5 0x7f63bb06fe2e in __GI___clone (/usr/local/fbcode/platform007/lib/libc.so.6+0x11ae2e)
I see curr_group_seen_begin initialized in the constructor, but not curr_group_seen_gtid. But it's not clear how we are skipping the initialization of these two variables in slave_start_workers(), but it looks like initializing curr_group_seen_gtid in the constructor removes the problem.
Jira ticket: https://jira.percona.com/browse/FB8-87 Jira ticket: https://jira.percona.com/browse/FB8-119 Reference commit: 5846968 Reference commit: d6217c9 -------- 5846968 -------- Statically assigning shards to slave workers can cause imbalance if a few shards are hotter than others. We should be able to check the imbalance among slave workers and dynamically reassign shards.
@dutow has updated the pull request. Re-import the pull request |
updated. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@hermanlee has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
Summary: Jira ticket: https://jira.percona.com/browse/FB8-87 Jira ticket: https://jira.percona.com/browse/FB8-119 Reference commit: 5846968 Reference commit: d6217c9 Statically assigning shards to slave workers can cause imbalance if a few shards are hotter than others. We should be able to check the imbalance among slave workers and dynamically reassign shards. Pull Request resolved: #999 Differential Revision: D14883857 fbshipit-source-id: efc8ddf
Summary: Jira ticket: https://jira.percona.com/browse/FB8-87 Jira ticket: https://jira.percona.com/browse/FB8-119 Reference commit: 5846968 Reference commit: d6217c9 Statically assigning shards to slave workers can cause imbalance if a few shards are hotter than others. We should be able to check the imbalance among slave workers and dynamically reassign shards. Pull Request resolved: #999 Differential Revision: D14883857 fbshipit-source-id: 7c13d7f
Summary: Jira ticket: https://jira.percona.com/browse/FB8-87 Jira ticket: https://jira.percona.com/browse/FB8-119 Reference commit: facebook@5846968 Reference commit: facebook@d6217c9 Statically assigning shards to slave workers can cause imbalance if a few shards are hotter than others. We should be able to check the imbalance among slave workers and dynamically reassign shards. Pull Request resolved: facebook#999 Differential Revision: D14883857 fbshipit-source-id: 7c13d7f
Summary: Jira ticket: https://jira.percona.com/browse/FB8-87 Jira ticket: https://jira.percona.com/browse/FB8-119 Reference commit: facebook@5846968 Reference commit: facebook@d6217c9 Statically assigning shards to slave workers can cause imbalance if a few shards are hotter than others. We should be able to check the imbalance among slave workers and dynamically reassign shards. Pull Request resolved: facebook#999 Differential Revision: D14883857 fbshipit-source-id: 7c13d7f
Summary: Jira ticket: https://jira.percona.com/browse/FB8-87 Jira ticket: https://jira.percona.com/browse/FB8-119 Reference commit: facebook@5846968 Reference commit: facebook@d6217c9 Statically assigning shards to slave workers can cause imbalance if a few shards are hotter than others. We should be able to check the imbalance among slave workers and dynamically reassign shards. Pull Request resolved: facebook#999 Differential Revision: D14883857 fbshipit-source-id: 7c13d7f
Summary: Jira ticket: https://jira.percona.com/browse/FB8-87 Jira ticket: https://jira.percona.com/browse/FB8-119 Reference commit: facebook@5846968 Reference commit: facebook@d6217c9 Statically assigning shards to slave workers can cause imbalance if a few shards are hotter than others. We should be able to check the imbalance among slave workers and dynamically reassign shards. Pull Request resolved: facebook#999 Differential Revision: D14883857 fbshipit-source-id: 7c13d7f
Summary: Jira ticket: https://jira.percona.com/browse/FB8-87 Jira ticket: https://jira.percona.com/browse/FB8-119 Reference commit: facebook@5846968 Reference commit: facebook@d6217c9 Statically assigning shards to slave workers can cause imbalance if a few shards are hotter than others. We should be able to check the imbalance among slave workers and dynamically reassign shards. Pull Request resolved: facebook#999 Differential Revision: D14883857 fbshipit-source-id: 7c13d7f
Summary: Jira ticket: https://jira.percona.com/browse/FB8-87 Jira ticket: https://jira.percona.com/browse/FB8-119 Reference commit: facebook@5846968 Reference commit: facebook@d6217c9 Statically assigning shards to slave workers can cause imbalance if a few shards are hotter than others. We should be able to check the imbalance among slave workers and dynamically reassign shards. Pull Request resolved: facebook#999 Differential Revision: D14883857 fbshipit-source-id: 7c13d7f
Summary: Jira ticket: https://jira.percona.com/browse/FB8-87 Jira ticket: https://jira.percona.com/browse/FB8-119 Reference commit: facebook@5846968 Reference commit: facebook@d6217c9 Statically assigning shards to slave workers can cause imbalance if a few shards are hotter than others. We should be able to check the imbalance among slave workers and dynamically reassign shards. Pull Request resolved: facebook#999 Differential Revision: D14883857 fbshipit-source-id: 7c13d7f
Summary: Jira ticket: https://jira.percona.com/browse/FB8-87 Jira ticket: https://jira.percona.com/browse/FB8-119 Reference commit: facebook@5846968 Reference commit: facebook@d6217c9 Statically assigning shards to slave workers can cause imbalance if a few shards are hotter than others. We should be able to check the imbalance among slave workers and dynamically reassign shards. Pull Request resolved: facebook#999 Differential Revision: D14883857 fbshipit-source-id: 7c13d7f
…acebook#999) Summary: Jira ticket: https://jira.percona.com/browse/FB8-87 Jira ticket: https://jira.percona.com/browse/FB8-119 Reference commit: facebook@5846968 Reference commit: facebook@d6217c9 Statically assigning shards to slave workers can cause imbalance if a few shards are hotter than others. We should be able to check the imbalance among slave workers and dynamically reassign shards. Pull Request resolved: facebook#999 Differential Revision: D14883857
…acebook#999) Summary: Jira ticket: https://jira.percona.com/browse/FB8-87 Jira ticket: https://jira.percona.com/browse/FB8-119 Reference commit: facebook@5846968 Reference commit: facebook@d6217c9 Statically assigning shards to slave workers can cause imbalance if a few shards are hotter than others. We should be able to check the imbalance among slave workers and dynamically reassign shards. Pull Request resolved: facebook#999 Differential Revision: D14883857
…acebook#999) Summary: Jira ticket: https://jira.percona.com/browse/FB8-87 Jira ticket: https://jira.percona.com/browse/FB8-119 Reference commit: facebook@5846968 Reference commit: facebook@d6217c9 Statically assigning shards to slave workers can cause imbalance if a few shards are hotter than others. We should be able to check the imbalance among slave workers and dynamically reassign shards. Pull Request resolved: facebook#999 Differential Revision: D14883857
…ercona#999) Summary: Jira ticket: https://jira.percona.com/browse/FB8-87 Jira ticket: https://jira.percona.com/browse/FB8-119 Reference commit: facebook/mysql-5.6@5846968 Reference commit: facebook/mysql-5.6@d6217c9 Statically assigning shards to slave workers can cause imbalance if a few shards are hotter than others. We should be able to check the imbalance among slave workers and dynamically reassign shards. Pull Request resolved: facebook/mysql-5.6#999 Differential Revision: D14883857
…ercona#999) Summary: Jira ticket: https://jira.percona.com/browse/FB8-87 Jira ticket: https://jira.percona.com/browse/FB8-119 Reference commit: facebook/mysql-5.6@5846968 Reference commit: facebook/mysql-5.6@d6217c9 Statically assigning shards to slave workers can cause imbalance if a few shards are hotter than others. We should be able to check the imbalance among slave workers and dynamically reassign shards. Pull Request resolved: facebook/mysql-5.6#999 Differential Revision: D14883857
…acebook#999) Summary: Jira ticket: https://jira.percona.com/browse/FB8-87 Jira ticket: https://jira.percona.com/browse/FB8-119 Reference commit: facebook@5846968 Reference commit: facebook@d6217c9 Statically assigning shards to slave workers can cause imbalance if a few shards are hotter than others. We should be able to check the imbalance among slave workers and dynamically reassign shards. Pull Request resolved: facebook#999 Differential Revision: D14883857
…acebook#999) Summary: Jira ticket: https://jira.percona.com/browse/FB8-87 Jira ticket: https://jira.percona.com/browse/FB8-119 Reference commit: facebook@5846968 Reference commit: facebook@d6217c9 Statically assigning shards to slave workers can cause imbalance if a few shards are hotter than others. We should be able to check the imbalance among slave workers and dynamically reassign shards. Pull Request resolved: facebook#999 Differential Revision: D14883857
…acebook#999) Summary: Jira ticket: https://jira.percona.com/browse/FB8-87 Jira ticket: https://jira.percona.com/browse/FB8-119 Reference commit: facebook@5846968 Reference commit: facebook@d6217c9 Statically assigning shards to slave workers can cause imbalance if a few shards are hotter than others. We should be able to check the imbalance among slave workers and dynamically reassign shards. Pull Request resolved: facebook#999 Differential Revision: D14883857
…acebook#999) Summary: Jira ticket: https://jira.percona.com/browse/FB8-87 Jira ticket: https://jira.percona.com/browse/FB8-119 Reference commit: facebook@5846968 Reference commit: facebook@d6217c9 Statically assigning shards to slave workers can cause imbalance if a few shards are hotter than others. We should be able to check the imbalance among slave workers and dynamically reassign shards. Pull Request resolved: facebook#999 Differential Revision: D14883857
…acebook#999) Summary: Jira ticket: https://jira.percona.com/browse/FB8-87 Jira ticket: https://jira.percona.com/browse/FB8-119 Reference commit: facebook@5846968 Reference commit: facebook@d6217c9 Statically assigning shards to slave workers can cause imbalance if a few shards are hotter than others. We should be able to check the imbalance among slave workers and dynamically reassign shards. Pull Request resolved: facebook#999 Differential Revision: D14883857
…acebook#999) Summary: Jira ticket: https://jira.percona.com/browse/FB8-87 Jira ticket: https://jira.percona.com/browse/FB8-119 Reference commit: facebook@5846968 Reference commit: facebook@d6217c9 Statically assigning shards to slave workers can cause imbalance if a few shards are hotter than others. We should be able to check the imbalance among slave workers and dynamically reassign shards. Pull Request resolved: facebook#999 Differential Revision: D14883857
…acebook#999) Summary: Jira ticket: https://jira.percona.com/browse/FB8-87 Jira ticket: https://jira.percona.com/browse/FB8-119 Reference commit: facebook@5846968 Reference commit: facebook@d6217c9 Statically assigning shards to slave workers can cause imbalance if a few shards are hotter than others. We should be able to check the imbalance among slave workers and dynamically reassign shards. Pull Request resolved: facebook#999 Differential Revision: D14883857
…acebook#999) Summary: Jira ticket: https://jira.percona.com/browse/FB8-87 Jira ticket: https://jira.percona.com/browse/FB8-119 Reference commit: facebook@5846968 Reference commit: facebook@d6217c9 Statically assigning shards to slave workers can cause imbalance if a few shards are hotter than others. We should be able to check the imbalance among slave workers and dynamically reassign shards. Pull Request resolved: facebook#999 Differential Revision: D14883857
…acebook#999) Summary: Jira ticket: https://jira.percona.com/browse/FB8-87 Jira ticket: https://jira.percona.com/browse/FB8-119 Reference commit: facebook@5846968 Reference commit: facebook@d6217c9 Statically assigning shards to slave workers can cause imbalance if a few shards are hotter than others. We should be able to check the imbalance among slave workers and dynamically reassign shards. Pull Request resolved: facebook#999 Differential Revision: D14883857
…acebook#999) Summary: Jira ticket: https://jira.percona.com/browse/FB8-87 Jira ticket: https://jira.percona.com/browse/FB8-119 Reference commit: facebook@5846968 Reference commit: facebook@d6217c9 Statically assigning shards to slave workers can cause imbalance if a few shards are hotter than others. We should be able to check the imbalance among slave workers and dynamically reassign shards. Pull Request resolved: facebook#999 Differential Revision: D14883857
…acebook#999) Summary: Jira ticket: https://jira.percona.com/browse/FB8-87 Jira ticket: https://jira.percona.com/browse/FB8-119 Reference commit: facebook@5846968 Reference commit: facebook@d6217c9 Statically assigning shards to slave workers can cause imbalance if a few shards are hotter than others. We should be able to check the imbalance among slave workers and dynamically reassign shards. Pull Request resolved: facebook#999 Differential Revision: D14883857
…acebook#999) Summary: Jira ticket: https://jira.percona.com/browse/FB8-87 Jira ticket: https://jira.percona.com/browse/FB8-119 Reference commit: facebook@5846968 Reference commit: facebook@d6217c9 Statically assigning shards to slave workers can cause imbalance if a few shards are hotter than others. We should be able to check the imbalance among slave workers and dynamically reassign shards. Pull Request resolved: facebook#999 Differential Revision: D14883857
…acebook#999) Summary: Jira ticket: https://jira.percona.com/browse/FB8-87 Jira ticket: https://jira.percona.com/browse/FB8-119 Reference commit: facebook@5846968 Reference commit: facebook@d6217c9 Statically assigning shards to slave workers can cause imbalance if a few shards are hotter than others. We should be able to check the imbalance among slave workers and dynamically reassign shards. Pull Request resolved: facebook#999 Differential Revision: D14883857
…acebook#999) Summary: Jira ticket: https://jira.percona.com/browse/FB8-87 Jira ticket: https://jira.percona.com/browse/FB8-119 Reference commit: facebook@5846968 Reference commit: facebook@d6217c9 Statically assigning shards to slave workers can cause imbalance if a few shards are hotter than others. We should be able to check the imbalance among slave workers and dynamically reassign shards. Pull Request resolved: facebook#999 Differential Revision: D14883857
…acebook#999) Summary: Jira ticket: https://jira.percona.com/browse/FB8-87 Jira ticket: https://jira.percona.com/browse/FB8-119 Reference commit: facebook@5846968 Reference commit: facebook@d6217c9 Statically assigning shards to slave workers can cause imbalance if a few shards are hotter than others. We should be able to check the imbalance among slave workers and dynamically reassign shards. Pull Request resolved: facebook#999 Differential Revision: D14883857
…acebook#999) Summary: Jira ticket: https://jira.percona.com/browse/FB8-87 Jira ticket: https://jira.percona.com/browse/FB8-119 Reference commit: facebook@5846968 Reference commit: facebook@d6217c9 Statically assigning shards to slave workers can cause imbalance if a few shards are hotter than others. We should be able to check the imbalance among slave workers and dynamically reassign shards. Pull Request resolved: facebook#999 Differential Revision: D14883857
…acebook#999) Summary: Jira ticket: https://jira.percona.com/browse/FB8-87 Jira ticket: https://jira.percona.com/browse/FB8-119 Reference commit: facebook@5846968 Reference commit: facebook@d6217c9 Statically assigning shards to slave workers can cause imbalance if a few shards are hotter than others. We should be able to check the imbalance among slave workers and dynamically reassign shards. Pull Request resolved: facebook#999 Differential Revision: D14883857
…acebook#999) Summary: Jira ticket: https://jira.percona.com/browse/FB8-87 Jira ticket: https://jira.percona.com/browse/FB8-119 Reference commit: facebook@5846968 Reference commit: facebook@d6217c9 Statically assigning shards to slave workers can cause imbalance if a few shards are hotter than others. We should be able to check the imbalance among slave workers and dynamically reassign shards. Pull Request resolved: facebook#999 Differential Revision: D14883857
…acebook#999) Summary: Jira ticket: https://jira.percona.com/browse/FB8-87 Jira ticket: https://jira.percona.com/browse/FB8-119 Reference commit: facebook@5846968 Reference commit: facebook@d6217c9 Statically assigning shards to slave workers can cause imbalance if a few shards are hotter than others. We should be able to check the imbalance among slave workers and dynamically reassign shards. Pull Request resolved: facebook#999 Differential Revision: D14883857
…acebook#999) Summary: Jira ticket: https://jira.percona.com/browse/FB8-87 Jira ticket: https://jira.percona.com/browse/FB8-119 Reference commit: facebook@5846968 Reference commit: facebook@d6217c9 Statically assigning shards to slave workers can cause imbalance if a few shards are hotter than others. We should be able to check the imbalance among slave workers and dynamically reassign shards. Pull Request resolved: facebook#999 Differential Revision: D14883857
…acebook#999) Summary: Jira ticket: https://jira.percona.com/browse/FB8-87 Jira ticket: https://jira.percona.com/browse/FB8-119 Reference commit: facebook@5846968 Reference commit: facebook@d6217c9 Statically assigning shards to slave workers can cause imbalance if a few shards are hotter than others. We should be able to check the imbalance among slave workers and dynamically reassign shards. Pull Request resolved: facebook#999 Differential Revision: D14883857
…acebook#999) Summary: Jira ticket: https://jira.percona.com/browse/FB8-87 Jira ticket: https://jira.percona.com/browse/FB8-119 Reference commit: facebook@5846968 Reference commit: facebook@d6217c9 Statically assigning shards to slave workers can cause imbalance if a few shards are hotter than others. We should be able to check the imbalance among slave workers and dynamically reassign shards. Pull Request resolved: facebook#999 Differential Revision: D14883857
…acebook#999) Summary: Jira ticket: https://jira.percona.com/browse/FB8-87 Jira ticket: https://jira.percona.com/browse/FB8-119 Reference commit: facebook@5846968 Reference commit: facebook@d6217c9 Statically assigning shards to slave workers can cause imbalance if a few shards are hotter than others. We should be able to check the imbalance among slave workers and dynamically reassign shards. Pull Request resolved: facebook#999 Differential Revision: D14883857
…acebook#999) Summary: Jira ticket: https://jira.percona.com/browse/FB8-87 Jira ticket: https://jira.percona.com/browse/FB8-119 Reference commit: facebook@5846968 Reference commit: facebook@d6217c9 Statically assigning shards to slave workers can cause imbalance if a few shards are hotter than others. We should be able to check the imbalance among slave workers and dynamically reassign shards. Pull Request resolved: facebook#999 Differential Revision: D14883857
…acebook#999) Summary: Jira ticket: https://jira.percona.com/browse/FB8-87 Jira ticket: https://jira.percona.com/browse/FB8-119 Reference commit: facebook@5846968 Reference commit: facebook@d6217c9 Statically assigning shards to slave workers can cause imbalance if a few shards are hotter than others. We should be able to check the imbalance among slave workers and dynamically reassign shards. Pull Request resolved: facebook#999 Differential Revision: D14883857
Jira ticket: https://jira.percona.com/browse/FB8-87
Jira ticket: https://jira.percona.com/browse/FB8-119
Reference commit: 5846968
Reference commit: d6217c9
Statically assigning shards to slave workers can cause imbalance if a few shards are hotter than others. We should be able to check the imbalance among slave workers and dynamically reassign shards.