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
36b8ac2c
Commit
36b8ac2c
authored
May 05, 2020
by
Eugene Kosov
Committed by
Marko Mäkelä
May 05, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove double std::map lookup
parent
937dfb74
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
5 deletions
+7
-5
storage/innobase/trx/trx0purge.cc
storage/innobase/trx/trx0purge.cc
+7
-5
No files found.
storage/innobase/trx/trx0purge.cc
View file @
36b8ac2c
...
@@ -43,6 +43,8 @@ Created 3/26/1996 Heikki Tuuri
...
@@ -43,6 +43,8 @@ Created 3/26/1996 Heikki Tuuri
#include "trx0trx.h"
#include "trx0trx.h"
#include <mysql/service_wsrep.h>
#include <mysql/service_wsrep.h>
#include <unordered_map>
/** Maximum allowable purge history length. <=0 means 'infinite'. */
/** Maximum allowable purge history length. <=0 means 'infinite'. */
ulong
srv_max_purge_lag
=
0
;
ulong
srv_max_purge_lag
=
0
;
...
@@ -1136,7 +1138,7 @@ trx_purge_attach_undo_recs(ulint n_purge_threads)
...
@@ -1136,7 +1138,7 @@ trx_purge_attach_undo_recs(ulint n_purge_threads)
i
=
0
;
i
=
0
;
const
ulint
batch_size
=
srv_purge_batch_size
;
const
ulint
batch_size
=
srv_purge_batch_size
;
std
::
map
<
table_id_t
,
purge_node_t
*>
table_id_map
;
std
::
unordered_map
<
table_id_t
,
purge_node_t
*>
table_id_map
;
mem_heap_empty
(
purge_sys
.
heap
);
mem_heap_empty
(
purge_sys
.
heap
);
while
(
UNIV_LIKELY
(
srv_undo_sources
)
||
!
srv_fast_shutdown
)
{
while
(
UNIV_LIKELY
(
srv_undo_sources
)
||
!
srv_fast_shutdown
)
{
...
@@ -1170,10 +1172,10 @@ trx_purge_attach_undo_recs(ulint n_purge_threads)
...
@@ -1170,10 +1172,10 @@ trx_purge_attach_undo_recs(ulint n_purge_threads)
table_id_t
table_id
=
trx_undo_rec_get_table_id
(
table_id_t
table_id
=
trx_undo_rec_get_table_id
(
purge_rec
.
undo_rec
);
purge_rec
.
undo_rec
);
auto
it
=
table_id_map
.
find
(
table_id
)
;
purge_node_t
*&
table_node
=
table_id_map
[
table_id
]
;
if
(
it
!=
table_id_map
.
end
()
)
{
if
(
table_node
)
{
node
=
it
->
second
;
node
=
table_node
;
}
else
{
}
else
{
thr
=
UT_LIST_GET_NEXT
(
thrs
,
thr
);
thr
=
UT_LIST_GET_NEXT
(
thrs
,
thr
);
...
@@ -1183,7 +1185,7 @@ trx_purge_attach_undo_recs(ulint n_purge_threads)
...
@@ -1183,7 +1185,7 @@ trx_purge_attach_undo_recs(ulint n_purge_threads)
}
}
ut_a
(
thr
!=
NULL
);
ut_a
(
thr
!=
NULL
);
table_
id_map
.
insert
({
table_id
,
node
})
;
table_
node
=
node
;
}
}
node
->
undo_recs
.
push
(
purge_rec
);
node
->
undo_recs
.
push
(
purge_rec
);
...
...
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