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
b620e736
Commit
b620e736
authored
Feb 26, 2014
by
Jan Lindström
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Small fixes to work_item handling.
parent
24235e99
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
22 deletions
+16
-22
storage/innobase/buf/buf0mtflu.cc
storage/innobase/buf/buf0mtflu.cc
+8
-11
storage/xtradb/buf/buf0mtflu.cc
storage/xtradb/buf/buf0mtflu.cc
+8
-11
No files found.
storage/innobase/buf/buf0mtflu.cc
View file @
b620e736
...
...
@@ -56,13 +56,14 @@ Modified 06/02/2014 Jan Lindström jan.lindstrom@skysql.com
/* Work item status */
typedef
enum
wrk_status
{
WRK_ITEM_
SET
=
0
,
/*!< Work item is
set */
WRK_ITEM_
UNSET
=
0
,
/*!< Work item is not
set */
WRK_ITEM_START
=
1
,
/*!< Processing of work item has started */
WRK_ITEM_DONE
=
2
,
/*!< Processing is done usually set to
SUCCESS/FAILED */
WRK_ITEM_SUCCESS
=
2
,
/*!< Work item successfully processed */
WRK_ITEM_FAILED
=
3
,
/*!< Work item process failed */
WRK_ITEM_EXIT
=
4
,
/*!< Exiting */
WRK_ITEM_SET
=
5
,
/*!< Work item is set */
WRK_ITEM_STATUS_UNDEFINED
}
wrk_status_t
;
...
...
@@ -179,9 +180,7 @@ buf_mtflu_flush_pool_instance(
pools based on the assumption that it will
help in the retry which will follow the
failure. */
#ifdef UNIV_DEBUG
fprintf
(
stderr
,
"flush start failed.
\n
"
);
#endif
fprintf
(
stderr
,
"InnoDB: Note: buf flush start failed there is already active flush for this buffer pool.
\n
"
);
return
0
;
}
...
...
@@ -257,12 +256,10 @@ mtflush_service_io(
return
;
case
MT_WRK_WRITE
:
ut_a
(
work_item
->
wi_status
==
WRK_ITEM_SET
);
work_item
->
wi_status
=
WRK_ITEM_START
;
/* Process work item */
if
(
0
==
(
n_flushed
=
buf_mtflu_flush_pool_instance
(
work_item
)))
{
#ifdef UNIV_DEBUG
fprintf
(
stderr
,
"No pages flushed
\n
"
);
#endif
work_item
->
wi_status
=
WRK_ITEM_FAILED
;
}
work_item
->
wi_status
=
WRK_ITEM_SUCCESS
;
...
...
@@ -320,7 +317,7 @@ buf_mtflu_io_thread_exit(void)
{
long
i
;
thread_sync_t
*
mtflush_io
=
mtflush_ctx
;
wrk_t
*
work_item
;
wrk_t
*
work_item
=
NULL
;
ut_a
(
mtflush_io
!=
NULL
);
...
...
@@ -358,7 +355,7 @@ buf_mtflu_io_thread_exit(void)
/* Collect all work done items */
for
(
i
=
0
;
i
<
srv_mtflush_threads
;)
{
wrk_t
*
work_item
;
wrk_t
*
work_item
=
NULL
;
work_item
=
(
wrk_t
*
)
ib_wqueue_timedwait
(
mtflush_io
->
wr_cq
,
MT_WAIT_IN_USECS
);
...
...
@@ -461,9 +458,8 @@ buf_mtflu_flush_work_items(
number does not exceed min_n) */
{
ulint
n_flushed
=
0
,
i
;
wrk_t
*
done_wi
;
mem_heap_t
*
work_heap
;
wrk_t
*
work_item
;
wrk_t
*
work_item
=
NULL
;
/* Allocate heap where all work items used and queue
node items areallocated */
...
...
@@ -488,6 +484,7 @@ buf_mtflu_flush_work_items(
/* wait on the completion to arrive */
for
(
i
=
0
;
i
<
buf_pool_inst
;)
{
wrk_t
*
done_wi
=
NULL
;
done_wi
=
(
wrk_t
*
)
ib_wqueue_wait
(
mtflush_ctx
->
wr_cq
);
if
(
done_wi
!=
NULL
)
{
...
...
storage/xtradb/buf/buf0mtflu.cc
View file @
b620e736
...
...
@@ -56,13 +56,14 @@ Modified 06/02/2014 Jan Lindström jan.lindstrom@skysql.com
/* Work item status */
typedef
enum
wrk_status
{
WRK_ITEM_
SET
=
0
,
/*!< Work item is
set */
WRK_ITEM_
UNSET
=
0
,
/*!< Work item is not
set */
WRK_ITEM_START
=
1
,
/*!< Processing of work item has started */
WRK_ITEM_DONE
=
2
,
/*!< Processing is done usually set to
SUCCESS/FAILED */
WRK_ITEM_SUCCESS
=
2
,
/*!< Work item successfully processed */
WRK_ITEM_FAILED
=
3
,
/*!< Work item process failed */
WRK_ITEM_EXIT
=
4
,
/*!< Exiting */
WRK_ITEM_SET
=
5
,
/*!< Work item is set */
WRK_ITEM_STATUS_UNDEFINED
}
wrk_status_t
;
...
...
@@ -181,9 +182,7 @@ buf_mtflu_flush_pool_instance(
pools based on the assumption that it will
help in the retry which will follow the
failure. */
#ifdef UNIV_DEBUG
fprintf
(
stderr
,
"flush start failed.
\n
"
);
#endif
fprintf
(
stderr
,
"InnoDB: Note: buf flush start failed there is already active flush for this buffer pool.
\n
"
);
return
0
;
}
...
...
@@ -262,12 +261,10 @@ mtflush_service_io(
return
;
case
MT_WRK_WRITE
:
ut_a
(
work_item
->
wi_status
==
WRK_ITEM_SET
);
work_item
->
wi_status
=
WRK_ITEM_START
;
/* Process work item */
if
(
0
==
(
n_flushed
=
buf_mtflu_flush_pool_instance
(
work_item
)))
{
#ifdef UNIV_DEBUG
fprintf
(
stderr
,
"No pages flushed
\n
"
);
#endif
work_item
->
wi_status
=
WRK_ITEM_FAILED
;
}
work_item
->
wi_status
=
WRK_ITEM_SUCCESS
;
...
...
@@ -346,7 +343,7 @@ buf_mtflu_io_thread_exit(void)
{
long
i
;
thread_sync_t
*
mtflush_io
=
mtflush_ctx
;
wrk_t
*
work_item
;
wrk_t
*
work_item
=
NULL
;
ut_a
(
mtflush_io
!=
NULL
);
...
...
@@ -384,7 +381,7 @@ buf_mtflu_io_thread_exit(void)
/* Collect all work done items */
for
(
i
=
0
;
i
<
srv_mtflush_threads
;)
{
wrk_t
*
work_item
;
wrk_t
*
work_item
=
NULL
;
work_item
=
(
wrk_t
*
)
ib_wqueue_timedwait
(
mtflush_io
->
wr_cq
,
MT_WAIT_IN_USECS
);
...
...
@@ -487,9 +484,8 @@ buf_mtflu_flush_work_items(
number does not exceed min_n) */
{
ulint
n_flushed
=
0
,
i
;
wrk_t
*
done_wi
;
mem_heap_t
*
work_heap
;
wrk_t
*
work_item
;
wrk_t
*
work_item
=
NULL
;
/* Allocate heap where all work items used and queue
node items areallocated */
...
...
@@ -514,6 +510,7 @@ buf_mtflu_flush_work_items(
/* wait on the completion to arrive */
for
(
i
=
0
;
i
<
buf_pool_inst
;)
{
wrk_t
*
done_wi
=
NULL
;
done_wi
=
(
wrk_t
*
)
ib_wqueue_wait
(
mtflush_ctx
->
wr_cq
);
if
(
done_wi
!=
NULL
)
{
...
...
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