Commit 2b5bc761 authored by Marko Mäkelä's avatar Marko Mäkelä

MDEV-14154: Document some time_t fields better

srv_slot_t::suspend_time, os_aio_slot_t::reservation_time,
sync_cell_t::reservation_time: Explain what could happen
if the system time has is being adjusted.

fts_sync_t::start_time: Document that the field is mostly unused.
parent 10727b69
/*****************************************************************************
Copyright (c) 2007, 2016, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 2019, MariaDB Corporation.
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
......@@ -122,7 +123,8 @@ struct fts_sync_t {
doc_id_t max_doc_id; /*!< The doc id at which the cache was
noted as being full, we use this to
set the upper_limit field */
ib_time_t start_time; /*!< SYNC start time */
time_t start_time; /*!< SYNC start time; only used if
fts_enable_diag_print */
bool in_progress; /*!< flag whether sync is in progress.*/
bool unlock_cache; /*!< flag whether unlock cache when
write fts node */
......
......@@ -122,8 +122,10 @@ struct sync_cell_t {
has not been signalled in the
period between the reset and
wait call. */
time_t reservation_time;/*!< time when the thread reserved
the wait cell */
/** time(NULL) when the wait cell was reserved.
FIXME: sync_array_print_long_waits_low() may display bogus
warnings when the system time is adjusted to the past! */
time_t reservation_time;
};
/* NOTE: It is allowed for a thread to wait
......
/*****************************************************************************
Copyright (c) 2007, 2016, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 2019, MariaDB Corporation.
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
......@@ -122,7 +123,8 @@ struct fts_sync_t {
doc_id_t max_doc_id; /*!< The doc id at which the cache was
noted as being full, we use this to
set the upper_limit field */
ib_time_t start_time; /*!< SYNC start time */
time_t start_time; /*!< SYNC start time; only used if
fts_enable_diag_print */
bool in_progress; /*!< flag whether sync is in progress.*/
bool unlock_cache; /*!< flag whether unlock cache when
write fts node */
......
......@@ -3,7 +3,7 @@
Copyright (c) 1995, 2017, Oracle and/or its affiliates. All rights reserved.
Copyright (c) 2008, 2009, Google Inc.
Copyright (c) 2009, Percona Inc.
Copyright (c) 2013, 2017, MariaDB Corporation.
Copyright (c) 2013, 2019, MariaDB Corporation.
Portions of this file contain modifications contributed and copyrighted by
Google, Inc. Those modifications are gratefully acknowledged and are described
......@@ -1329,10 +1329,11 @@ struct srv_slot_t{
ibool suspended; /*!< TRUE if the thread is
waiting for the event of this
slot */
ib_time_t suspend_time; /*!< time when the thread was
suspended. Initialized by
lock_wait_table_reserve_slot()
for lock wait */
/** time(NULL) when the thread was suspended.
FIXME: Use my_interval_timer() or similar, to avoid bogus
timeouts in lock_wait_check_and_cancel() or lock_wait_suspend_thread()
when the system time is adjusted to the past! */
time_t suspend_time;
ulong wait_timeout; /*!< wait time that if exceeded
the thread will be timed out.
Initialized by
......
......@@ -214,7 +214,10 @@ struct os_aio_slot_t{
ulint pos; /*!< index of the slot in the aio
array */
ibool reserved; /*!< TRUE if this slot is reserved */
time_t reservation_time;/*!< time when reserved */
/** time(NULL) when reserved.
FIXME: os_aio_simulated_handle() may malfunction if
the system time is adjusted! */
time_t reservation_time;
ulint len; /*!< length of the block to read or
write */
byte* buf; /*!< buffer used in i/o */
......
......@@ -123,8 +123,10 @@ struct sync_cell_t {
has not been signalled in the
period between the reset and
wait call. */
time_t reservation_time;/*!< time when the thread reserved
the wait cell */
/** time(NULL) when the wait cell was reserved.
FIXME: sync_array_print_long_waits_low() may display bogus
warnings when the system time is adjusted to the past! */
time_t reservation_time;
};
/* NOTE: It is allowed for a thread to wait
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment