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
8307fc9d
Commit
8307fc9d
authored
Dec 25, 2017
by
Eugene Kosov
Committed by
Sergey Vojtovich
Dec 25, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix a data race in debug build (#523)
* fix a data race in debug build
parent
1761e382
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
8 deletions
+8
-8
storage/innobase/fil/fil0fil.cc
storage/innobase/fil/fil0fil.cc
+8
-8
No files found.
storage/innobase/fil/fil0fil.cc
View file @
8307fc9d
...
...
@@ -188,19 +188,19 @@ bool
fil_validate_skip
(
void
)
/*===================*/
{
/** The fil_validate() call skip counter. Use a signed type
because of the race condition below. */
/** The fil_validate() call skip counter. */
static
int
fil_validate_count
=
FIL_VALIDATE_SKIP
;
/*
There is a race condition below, but it does not matter,
because this call is only for heuristic purposes. We want to
reduce the call frequency of the costly fil_validate() check
in debug builds. */
if
(
--
fil_validate_
count
>
0
)
{
/*
We want to reduce the call frequency of the costly fil_validate()
check in debug builds. */
int
count
=
my_atomic_add32_explicit
(
&
fil_validate_count
,
-
1
,
MY_MEMORY_ORDER_RELAXED
);
if
(
count
>
0
)
{
return
(
true
);
}
fil_validate_count
=
FIL_VALIDATE_SKIP
;
my_atomic_store32_explicit
(
&
fil_validate_count
,
FIL_VALIDATE_SKIP
,
MY_MEMORY_ORDER_RELAXED
);
return
(
fil_validate
());
}
#endif
/* UNIV_DEBUG */
...
...
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