bneradt commented on code in PR #9172:
URL: https://github.com/apache/trafficserver/pull/9172#discussion_r1012376031


##########
iocore/hostdb/HostDB.cc:
##########
@@ -1479,7 +1479,7 @@ HostDBContinuation::backgroundEvent(int /* event 
ATS_UNUSED */, Event * /* e ATS
     return EVENT_CONT;
   }
 
-  if ((hostdb_current_timestamp - hostdb_last_timestamp) > 
hostdb_hostfile_check_interval) {
+  if ((hostdb_current_timestamp.load() - hostdb_last_timestamp) > 
hostdb_hostfile_check_interval) {

Review Comment:
   I don't think we need to call `.load()` here.



##########
iocore/hostdb/I_HostDBProcessor.h:
##########
@@ -753,7 +753,8 @@ HostDBRecord::ip_age() const
 {
   static constexpr ts_seconds ZERO{0};
   static constexpr ts_seconds MAX{0x7FFFFFFF};
-  return 
std::clamp(std::chrono::duration_cast<ts_seconds>(hostdb_current_timestamp - 
ip_timestamp), ZERO, MAX);
+
+  return 
std::clamp(std::chrono::duration_cast<ts_seconds>(hostdb_current_timestamp.load()
 - ip_timestamp), ZERO, MAX);

Review Comment:
   I don't think we need to call `.load()` here.



-- 
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]

Reply via email to