sodonnel commented on PR #4093:
URL: https://github.com/apache/ozone/pull/4093#issuecomment-1354451480

   > > We should not use `Instant.now()` but revert to using only monotonic 
clocks in all places.
   > 
   > We need use SystemClock() as object inside method, because pipeline Time 
is serialized to DB also. But clock instance is also used for checking time 
taken, but way of usecase.
   > 
   > In Recon, its using Instance.now().
   
   This is because we didn't change all usage of time to the new model. We have 
been fixing things on a case by case basis, and trying to ensure new code 
follows the new pattern.
   
   >     1. create a new clock as system clock and with existing Monotonic 
clock, use systemClock for this usages
   > 
   >     2. Same change for Recon also to remove Instance.now()
   > 
   > 
   > OR current changes in PR is ok as similar to Recon.
   
   Existing change is not OK. It also breaks the tests. Lets just try to 
replace all occurrences on MonotonicClock in the project with 
java.util.SystemClock instead. It should be a drop in replacement.
   
   Intellij reckons there are 24 occurrences of it through the code base, which 
isn't too many to fix.
   
   


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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to