Skip to content

bb-10.4-galera4 svoj review 4 and 5 fixes - #1078

Merged
svoj merged 16 commits into
MariaDB:bb-10.4-galera4from
mariadb-corporation:bb-10.4-galera4-svoj-review-4
Jan 15, 2019
Merged

bb-10.4-galera4 svoj review 4 and 5 fixes#1078
svoj merged 16 commits into
MariaDB:bb-10.4-galera4from
mariadb-corporation:bb-10.4-galera4-svoj-review-4

Conversation

@sjaakola

@sjaakola sjaakola commented Jan 9, 2019

Copy link
Copy Markdown
Contributor

This pull request contains code refactoring addressing svoj's reviews 4 and 5

@janlindstrom janlindstrom self-assigned this Jan 9, 2019

@janlindstrom janlindstrom left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lets do not remove wsrep plugin.

@svoj svoj left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Quite a few suggestions were not implemented/commented. To avoid blocking this big change, I suggest that we handle them separately (I'll send another email).

Please fix minor things that I outlined in a separate commit, then we can merge it.

#else

/* Copyright (c) 2015 MariaDB Corporation Ab
2018 Codership Oy <info@codership.com>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't really mind having Codership here, I was only concerned about GPL header removal.

@@ -1,7 +1,7 @@
#
!#

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess it wasn't intentional.

Comment thread sql/log.h Outdated
@@ -97,8 +97,6 @@ extern PSI_cond_key key_COND_prepare_ordered;
#endif
#ifdef WITH_WSREP
int wsrep_thd_binlog_commit(THD *thd, bool all);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wsrep_thd_binlog_commit() is never defined too. Remove it along with TC_LOG_DUMMY::commit()?

Comment thread sql/handler.cc
(thd->wsrep_ignore_table == true))
{
return 0;
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We'll get a conflict with PR#1047 here. And again correct way to check for this flag is:
table->file->partition_ht()->flags & HTON_WSREP_REPLICATION

Comment thread sql/wsrep_mysqld.cc Outdated
ticket->wsrep_report(true);
mysql_mutex_unlock(&granted_thd->LOCK_thd_data);
ret= TRUE;
unireg_abort(1);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No tabs, please.

Comment thread sql/wsrep_schema.cc Outdated
Wsrep_schema_impl::init_stmt(thd);
if (Wsrep_schema_impl::open_for_write(thd, "members", &members_table))
if (Wsrep_schema_impl::open_for_write(thd, cluster_members_str.c_str(),
&members_table))

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No tabs, please.

Comment thread sql/mdl.cc Outdated
{
if ((wsrep_thd_is_toi(requestor_ctx->get_thd()) ||
wsrep_thd_is_applying(requestor_ctx->get_thd())) &&
key.mdl_namespace() == MDL_key::BACKUP)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No tabs, please.

Comment thread sql/mdl.cc
else
{
wsrep_can_grant= FALSE;
wsrep_handle_mdl_conflict(requestor_ctx, ticket, &key);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess this branch should only be executed by wsrep thread.
Also for performance reasons non-wsrep thread should break immediately after it found incompatible lock.
To avoid code duplication, can we integrate this WITH_WSREP block into original one a few lines below?

@svoj

svoj commented Jan 9, 2019

Copy link
Copy Markdown
Contributor

Also please rebase after #1047 is merged: there're conflicting changes both in bb-10.4-galera4 and #1047.

@sjaakola
sjaakola force-pushed the bb-10.4-galera4-svoj-review-4 branch from 83a0dab to b74def6 Compare January 13, 2019 11:07
* brought back the license text in service_wsrep.h, which
  was dropped by mistake during original merging
* introduced new handlerton flag HTON_WSREP_REPLICATION for marking
  storage engines, which can use wsrep replication provider
  Refactored to use HTON_WSREP_REPLICATION flag instead of checking
  if handlerton db_type is DB_TYPE_INNODB
* removed the obsolete ha_fake_trx_id usage
* fixed the logic in detecting partition engine
* removed duplicate condition in binlog_log_row_internal()
  (same check already in uper level binlog_log_row())
* galera.partiton test still showing regression
  reverted back to original wsrep_db_type() method to
  find out partition engine's underlying table type
* refactored to not use wsrep MDL execption anymore
* fix for the can_grant logic
* wsrep_ignore_table was not dropped from the condition to whetther binlog or not
  this caused regressions with some tests e.g. galera.galera_gtid_slave
* dropped wsrep_schema and moved tables from there to mysql database
  many test results affected by renaming
Previous commit reverted earlier commit: 6362d81
in order to bring back the wsrep_plugin, which was removed in that commit.
However, the reverted commit contained also some other changes, which are needed for 10.4.
This commit will bring back those reverted changes.
Fixes for comments in the PR#1078
Fix for the MDL can_grant logic, because of wsrep thread processing RSU DDL
has wsrep_on==OFF
Retained Codership's copyright clause in include/mysql/service_wsrep.h
Fixed a regression which surfaced e.g. with galera.galera_unicode_pk
Reason for the regression was that implicit commit for empty transaction did not trigger
wsrep transaction cleanup
Removed debug version shortcut, left here by merge mistake
@sjaakola
sjaakola force-pushed the bb-10.4-galera4-svoj-review-4 branch from 325d2d4 to e1b6ee3 Compare January 15, 2019 13:24
@svoj svoj added this to the 10.4 milestone Jan 15, 2019
@svoj svoj self-assigned this Jan 15, 2019
@svoj
svoj merged commit dfd9acd into MariaDB:bb-10.4-galera4 Jan 15, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants