summaryrefslogtreecommitdiff
path: root/storage/innobase
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2019-07-24 13:55:59 +0300
committerMarko Mäkelä <marko.makela@mariadb.com>2019-07-24 21:59:26 +0300
commit2b5bc761d3a2a9b460b4cbb8e8a9ce0d50e63371 (patch)
treef5502a690e9e16e9ebe82a62c28f7dabcf20cc63 /storage/innobase
parent10727b69530da609c26d61294ec4f6870b62a09a (diff)
downloadmariadb-git-2b5bc761d3a2a9b460b4cbb8e8a9ce0d50e63371.tar.gz
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.
Diffstat (limited to 'storage/innobase')
-rw-r--r--storage/innobase/include/fts0types.h4
-rw-r--r--storage/innobase/sync/sync0arr.cc6
2 files changed, 7 insertions, 3 deletions
diff --git a/storage/innobase/include/fts0types.h b/storage/innobase/include/fts0types.h
index 0da9fe47955..3cb01a92df0 100644
--- a/storage/innobase/include/fts0types.h
+++ b/storage/innobase/include/fts0types.h
@@ -1,6 +1,7 @@
/*****************************************************************************
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 */
diff --git a/storage/innobase/sync/sync0arr.cc b/storage/innobase/sync/sync0arr.cc
index 8f83f2e0919..91a07a9a4c0 100644
--- a/storage/innobase/sync/sync0arr.cc
+++ b/storage/innobase/sync/sync0arr.cc
@@ -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