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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
90151609
Commit
90151609
authored
Mar 20, 2009
by
unknown
Browse files
Options
Browse Files
Download
Plain Diff
Merge
parents
30f41550
36252821
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
1 deletion
+7
-1
storage/maria/ma_loghandler.c
storage/maria/ma_loghandler.c
+7
-1
No files found.
storage/maria/ma_loghandler.c
View file @
90151609
...
...
@@ -333,6 +333,8 @@ struct st_translog_descriptor
my_bool
is_everything_flushed
;
/* True when flush pass is in progress */
my_bool
flush_in_progress
;
/* The flush number (used to distinguish two flushes goes one by one) */
volatile
int
flush_no
;
/* Next flush pass variables */
TRANSLOG_ADDRESS
next_pass_max_lsn
;
pthread_t
max_lsn_requester
;
...
...
@@ -3484,6 +3486,8 @@ my_bool translog_init_with_table(const char *directory,
id_to_share
=
NULL
;
log_descriptor
.
directory_fd
=
-
1
;
log_descriptor
.
is_everything_flushed
=
1
;
log_descriptor
.
flush_in_progress
=
0
;
log_descriptor
.
flush_no
=
0
;
log_descriptor
.
next_pass_max_lsn
=
LSN_IMPOSSIBLE
;
(
*
init_table_func
)();
...
...
@@ -7548,6 +7552,7 @@ void translog_flush_wait_for_end(LSN lsn)
void
translog_flush_set_new_goal_and_wait
(
TRANSLOG_ADDRESS
lsn
)
{
int
flush_no
=
log_descriptor
.
flush_no
;
DBUG_ENTER
(
"translog_flush_set_new_goal_and_wait"
);
DBUG_PRINT
(
"enter"
,
(
"LSN: (%lu,0x%lx)"
,
LSN_IN_PARTS
(
lsn
)));
safe_mutex_assert_owner
(
&
log_descriptor
.
log_flush_lock
);
...
...
@@ -7556,7 +7561,7 @@ void translog_flush_set_new_goal_and_wait(TRANSLOG_ADDRESS lsn)
log_descriptor
.
next_pass_max_lsn
=
lsn
;
log_descriptor
.
max_lsn_requester
=
pthread_self
();
}
while
(
log_descriptor
.
flush_in_progress
)
while
(
flush_no
==
log_descriptor
.
flush_no
)
{
pthread_cond_wait
(
&
log_descriptor
.
log_flush_cond
,
&
log_descriptor
.
log_flush_lock
);
...
...
@@ -7735,6 +7740,7 @@ out:
if
(
sent_to_disk
!=
LSN_IMPOSSIBLE
)
log_descriptor
.
flushed
=
sent_to_disk
;
log_descriptor
.
flush_in_progress
=
0
;
log_descriptor
.
flush_no
++
;
DBUG_PRINT
(
"info"
,
(
"flush_in_progress is dropped"
));
pthread_mutex_unlock
(
&
log_descriptor
.
log_flush_lock
);
\
pthread_cond_broadcast
(
&
log_descriptor
.
log_flush_cond
);
...
...
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