Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
fb4b3472
Commit
fb4b3472
authored
Jul 19, 2018
by
Oleksandr Byelkin
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch '10.1' into bb-10.1-merge-sanja
parents
0896d7eb
09f14765
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
13 deletions
+27
-13
sql/wsrep_binlog.cc
sql/wsrep_binlog.cc
+11
-3
sql/wsrep_sst.cc
sql/wsrep_sst.cc
+16
-10
No files found.
sql/wsrep_binlog.cc
View file @
fb4b3472
...
...
@@ -326,11 +326,16 @@ void wsrep_dump_rbr_buf(THD *thd, const void* rbr_buf, size_t buf_len)
WSREP_ERROR
(
"snprintf error: %d, skipping dump."
,
len
);
return
;
}
/*
len doesn't count the \0 end-of-string. Use len+1 below
to alloc and pass as an argument to snprintf.
*/
char
*
filename
=
(
char
*
)
malloc
(
len
+
1
);
int
len1
=
snprintf
(
filename
,
len
,
"%s/GRA_%ld_%lld.log"
,
int
len1
=
snprintf
(
filename
,
len
+
1
,
"%s/GRA_%ld_%lld.log"
,
wsrep_data_home_dir
,
thd
->
thread_id
,
(
long
long
)
wsrep_thd_trx_seqno
(
thd
));
if
(
len
>
len1
)
{
WSREP_ERROR
(
"RBR dump path truncated: %d, skipping dump."
,
len
);
...
...
@@ -469,7 +474,10 @@ void wsrep_dump_rbr_buf_with_header(THD *thd, const void *rbr_buf,
int
len
=
snprintf
(
NULL
,
0
,
"%s/GRA_%ld_%lld_v2.log"
,
wsrep_data_home_dir
,
thd
->
thread_id
,
thd_trx_seqno
);
/*
len doesn't count the \0 end-of-string. Use len+1 below
to alloc and pass as an argument to snprintf.
*/
char
*
filename
;
if
(
len
<
0
||
!
(
filename
=
(
char
*
)
malloc
(
len
+
1
)))
{
...
...
@@ -477,7 +485,7 @@ void wsrep_dump_rbr_buf_with_header(THD *thd, const void *rbr_buf,
DBUG_VOID_RETURN
;
}
int
len1
=
snprintf
(
filename
,
len
,
"%s/GRA_%ld_%lld_v2.log"
,
int
len1
=
snprintf
(
filename
,
len
+
1
,
"%s/GRA_%ld_%lld_v2.log"
,
wsrep_data_home_dir
,
thd
->
thread_id
,
thd_trx_seqno
);
...
...
sql/wsrep_sst.cc
View file @
fb4b3472
...
...
@@ -204,8 +204,7 @@ void wsrep_sst_grab ()
// Wait for end of SST
bool
wsrep_sst_wait
()
{
struct
timespec
wtime
=
{
WSREP_TIMEDWAIT_SECONDS
,
0
};
uint32
total_wtime
=
0
;
double
total_wtime
=
0
;
if
(
mysql_mutex_lock
(
&
LOCK_wsrep_sst
))
abort
();
...
...
@@ -214,14 +213,18 @@ bool wsrep_sst_wait ()
while
(
!
sst_complete
)
{
struct
timespec
wtime
;
set_timespec
(
wtime
,
WSREP_TIMEDWAIT_SECONDS
);
time_t
start_time
=
time
(
NULL
);
mysql_cond_timedwait
(
&
COND_wsrep_sst
,
&
LOCK_wsrep_sst
,
&
wtime
);
time_t
end_time
=
time
(
NULL
);
if
(
!
sst_complete
)
{
total_wtime
+=
wtime
.
tv_sec
;
WSREP_DEBUG
(
"Waiting for SST to complete.
waited %u secs."
,
total_wtime
);
total_wtime
+=
difftime
(
end_time
,
start_time
)
;
WSREP_DEBUG
(
"Waiting for SST to complete.
current seqno: %ld waited %f secs."
,
local_seqno
,
total_wtime
);
service_manager_extend_timeout
(
WSREP_EXTEND_TIMEOUT_INTERVAL
,
"WSREP state transfer ongoing, current seqno: %ld
"
,
local_seqno
);
"WSREP state transfer ongoing, current seqno: %ld
waited %f secs"
,
local_seqno
,
total_wtime
);
}
}
...
...
@@ -1319,19 +1322,22 @@ void wsrep_SE_init_grab()
void
wsrep_SE_init_wait
()
{
struct
timespec
wtime
=
{
WSREP_TIMEDWAIT_SECONDS
,
0
};
uint32
total_wtime
=
0
;
double
total_wtime
=
0
;
while
(
SE_initialized
==
false
)
{
struct
timespec
wtime
;
set_timespec
(
wtime
,
WSREP_TIMEDWAIT_SECONDS
);
time_t
start_time
=
time
(
NULL
);
mysql_cond_timedwait
(
&
COND_wsrep_sst_init
,
&
LOCK_wsrep_sst_init
,
&
wtime
);
time_t
end_time
=
time
(
NULL
);
if
(
!
SE_initialized
)
{
total_wtime
+=
wtime
.
tv_sec
;
WSREP_DEBUG
(
"Waiting for SST to complete.
waited %u secs."
,
total_wtime
);
total_wtime
+=
difftime
(
end_time
,
start_time
)
;
WSREP_DEBUG
(
"Waiting for SST to complete.
current seqno: %ld waited %f secs."
,
local_seqno
,
total_wtime
);
service_manager_extend_timeout
(
WSREP_EXTEND_TIMEOUT_INTERVAL
,
"WSREP
SE initialization ongoing."
);
"WSREP
state transfer ongoing, current seqno: %ld waited %f secs"
,
local_seqno
,
total_wtime
);
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment