ywkaras commented on a change in pull request #7874:
URL: https://github.com/apache/trafficserver/pull/7874#discussion_r747743542
##########
File path: iocore/hostdb/HostDB.cc
##########
@@ -50,78 +54,214 @@ unsigned int hostdb_ip_stale_interval =
HOST_DB_IP_STALE;
unsigned int hostdb_ip_timeout_interval = HOST_DB_IP_TIMEOUT;
unsigned int hostdb_ip_fail_timeout_interval = HOST_DB_IP_FAIL_TIMEOUT;
unsigned int hostdb_serve_stale_but_revalidate = 0;
-unsigned int hostdb_hostfile_check_interval = 86400; // 1 day
+ts_seconds hostdb_hostfile_check_interval{std::chrono::hours(24)};
// Epoch timestamp of the current hosts file check.
-ink_time_t hostdb_current_interval = 0;
+ts_time hostdb_current_interval{TS_TIME_ZERO};
// Epoch timestamp of the last time we actually checked for a hosts file
update.
-static ink_time_t hostdb_last_interval = 0;
+static ts_time hostdb_last_interval{TS_TIME_ZERO};
// Epoch timestamp when we updated the hosts file last.
-static ink_time_t hostdb_hostfile_update_timestamp = 0;
-static char hostdb_filename[PATH_NAME_MAX] = DEFAULT_HOST_DB_FILENAME;
-int hostdb_max_count = DEFAULT_HOST_DB_SIZE;
-char hostdb_hostfile_path[PATH_NAME_MAX] = "";
-int hostdb_sync_frequency = 0;
-int hostdb_disable_reverse_lookup = 0;
-int hostdb_max_iobuf_index = BUFFER_SIZE_INDEX_32K;
-
-// Verify the generic storage is sufficient to cover all alternate members.
-static_assert(sizeof(HostDBApplicationInfo::allotment) ==
sizeof(HostDBApplicationInfo),
- "Generic storage for HostDBApplicationInfo is smaller than the
union storage.");
+static ts_time hostdb_hostfile_update_timestamp{TS_TIME_ZERO};
+static char hostdb_filename[PATH_NAME_MAX] = DEFAULT_HOST_DB_FILENAME;
+int hostdb_max_count = DEFAULT_HOST_DB_SIZE;
Review comment:
The idea of the above is to give read-only access outside of HostDB.cc.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]