-
Notifications
You must be signed in to change notification settings - Fork 34
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
Gh104 #106
Open
ayurchen
wants to merge
3
commits into
gh33
Choose a base branch
from
gh104
base: gh33
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Gh104 #106
Changes from 2 commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
3dc0515
Added more diagnostic (process name and PID) to be printed in case po…
ayurchen be78f87
Refs codership/mysql-wsrep#104 - read/write seqno to XID always in li…
ayurchen d1a262f
Refs codership/mysql-wsrep#104 - fixed a questionable upgrade strateg…
ayurchen File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -317,22 +317,11 @@ trx_sys_print_mysql_binlog_offset(void) | |
|
||
#ifdef WITH_WSREP | ||
|
||
#include <wsrep_xid.h> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This introduces unnecessary dependency between InnoDB and MySQL/wsrep code. Setting |
||
#ifdef UNIV_DEBUG | ||
static long long trx_sys_cur_xid_seqno = -1; | ||
static unsigned char trx_sys_cur_xid_uuid[16]; | ||
|
||
long long read_wsrep_xid_seqno(const XID* xid) | ||
{ | ||
long long seqno; | ||
memcpy(&seqno, xid->data + 24, sizeof(long long)); | ||
return seqno; | ||
} | ||
|
||
void read_wsrep_xid_uuid(const XID* xid, unsigned char* buf) | ||
{ | ||
memcpy(buf, xid->data + 8, 16); | ||
} | ||
|
||
static size_t const xid_len = sizeof(trx_sys_cur_xid_uuid); | ||
#endif /* UNIV_DEBUG */ | ||
|
||
void | ||
|
@@ -345,17 +334,17 @@ trx_sys_update_wsrep_checkpoint( | |
#ifdef UNIV_DEBUG | ||
{ | ||
/* Check that seqno is monotonically increasing */ | ||
unsigned char xid_uuid[16]; | ||
long long xid_seqno = read_wsrep_xid_seqno(xid); | ||
read_wsrep_xid_uuid(xid, xid_uuid); | ||
if (!memcmp(xid_uuid, trx_sys_cur_xid_uuid, 8)) | ||
const wsrep_uuid_t* const xid_uuid = wsrep_xid_uuid(*xid); | ||
wsrep_seqno_t const xid_seqno = wsrep_xid_seqno(*xid); | ||
if (!memcmp(xid_uuid, trx_sys_cur_xid_uuid, xid_len)) | ||
{ | ||
ut_ad(xid_seqno > trx_sys_cur_xid_seqno); | ||
ut_ad(xid_seqno > trx_sys_cur_xid_seqno || | ||
trx_sys_cur_xid_seqno < 0); | ||
trx_sys_cur_xid_seqno = xid_seqno; | ||
} | ||
else | ||
{ | ||
memcpy(trx_sys_cur_xid_uuid, xid_uuid, 16); | ||
memcpy(trx_sys_cur_xid_uuid, xid_uuid, xid_len); | ||
} | ||
trx_sys_cur_xid_seqno = xid_seqno; | ||
} | ||
|
@@ -409,8 +398,7 @@ trx_sys_read_wsrep_checkpoint(XID* xid) | |
if ((magic = mach_read_from_4(sys_header + TRX_SYS_WSREP_XID_INFO | ||
+ TRX_SYS_WSREP_XID_MAGIC_N_FLD)) | ||
!= TRX_SYS_WSREP_XID_MAGIC_N) { | ||
memset(xid, 0, sizeof(*xid)); | ||
xid->formatID = -1; | ||
wsrep_xid_init(*xid,WSREP_UUID_UNDEFINED,WSREP_SEQNO_UNDEFINED); | ||
trx_sys_update_wsrep_checkpoint(xid, sys_header, &mtr); | ||
mtr_commit(&mtr); | ||
return; | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
This looks like a time bomb. It would probably be better to change WSREP_XID_PREFIX and do the byteswap if the stored value has the new format.
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.
Does WSREP_XID_PREFIX act as a version ID? If so, then indeed it is better.