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
3bdd93c1
Commit
3bdd93c1
authored
Dec 29, 2018
by
Sergey Vojtovich
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tc_contention_warning_reported transition to std::atomic
parent
0f034e2e
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
sql/table_cache.cc
sql/table_cache.cc
+3
-3
No files found.
sql/table_cache.cc
View file @
3bdd93c1
...
@@ -57,7 +57,7 @@ ulong tdc_size; /**< Table definition cache threshold for LRU eviction. */
...
@@ -57,7 +57,7 @@ ulong tdc_size; /**< Table definition cache threshold for LRU eviction. */
ulong
tc_size
;
/**< Table cache threshold for LRU eviction. */
ulong
tc_size
;
/**< Table cache threshold for LRU eviction. */
uint32
tc_instances
;
uint32
tc_instances
;
uint32
tc_active_instances
=
1
;
uint32
tc_active_instances
=
1
;
static
uint32
tc_contention_warning_reported
;
static
std
::
atomic
<
bool
>
tc_contention_warning_reported
;
/** Data collections. */
/** Data collections. */
static
LF_HASH
tdc_hash
;
/**< Collection of TABLE_SHARE objects. */
static
LF_HASH
tdc_hash
;
/**< Collection of TABLE_SHARE objects. */
...
@@ -187,8 +187,8 @@ struct Table_cache_instance
...
@@ -187,8 +187,8 @@ struct Table_cache_instance
n_instances
+
1
);
n_instances
+
1
);
}
}
}
}
else
if
(
!
my_atomic_fas32_explicit
((
int32
*
)
&
tc_contention_warning_reported
,
else
if
(
!
tc_contention_warning_reported
.
exchange
(
true
,
1
,
MY_MEMORY_ORDER_RELAXED
))
std
::
memory_order_relaxed
))
{
{
sql_print_warning
(
"Detected table cache mutex contention at instance %d: "
sql_print_warning
(
"Detected table cache mutex contention at instance %d: "
"%d%% waits. Additional table cache instance "
"%d%% waits. Additional table cache instance "
...
...
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