mirror of
https://github.com/MariaDB/server.git
synced 2026-05-10 17:14:30 +02:00
MDEV-24333 Data race in os_file_pread at os/os0file.cc:3308 on os_n_file_reads
os_n_file_reads: make Atomic_counter and correct the semantics of an imprecise counter. Reviewed by: Marko Mäkelä
This commit is contained in:
parent
24ec8eaf66
commit
fccd810404
2 changed files with 5 additions and 3 deletions
|
|
@ -45,6 +45,8 @@ Created 10/21/1995 Heikki Tuuri
|
|||
#include <time.h>
|
||||
#endif /* !_WIN32 */
|
||||
|
||||
#include "my_counter.h"
|
||||
|
||||
/** File node of a tablespace or the log data space */
|
||||
struct fil_node_t;
|
||||
struct fil_space_t;
|
||||
|
|
@ -460,7 +462,7 @@ or write, causing a bottleneck for parallelism. */
|
|||
static const ulint OS_AIO_SYNC = 24;
|
||||
/* @} */
|
||||
|
||||
extern ulint os_n_file_reads;
|
||||
extern Atomic_counter<ulint> os_n_file_reads;
|
||||
extern ulint os_n_file_writes;
|
||||
extern ulint os_n_fsyncs;
|
||||
|
||||
|
|
|
|||
|
|
@ -674,7 +674,7 @@ static ulint os_aio_n_segments = ULINT_UNDEFINED;
|
|||
wait until a batch of new read requests have been posted */
|
||||
static bool os_aio_recommend_sleep_for_read_threads;
|
||||
|
||||
ulint os_n_file_reads;
|
||||
Atomic_counter<ulint> os_n_file_reads;
|
||||
static ulint os_bytes_read_since_printout;
|
||||
ulint os_n_file_writes;
|
||||
ulint os_n_fsyncs;
|
||||
|
|
@ -7411,7 +7411,7 @@ os_aio_print(FILE* file)
|
|||
ULINTPF " OS fsyncs\n",
|
||||
fil_n_pending_log_flushes,
|
||||
fil_n_pending_tablespace_flushes,
|
||||
os_n_file_reads,
|
||||
ulint{os_n_file_reads},
|
||||
os_n_file_writes,
|
||||
os_n_fsyncs);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue