s0l0ist commented on code in PR #2899:
URL: 
https://github.com/apache/datafusion-ballista/pull/2899#discussion_r4641338185


##########
ballista/scheduler/src/scheduler_server/mod.rs:
##########
@@ -98,7 +98,7 @@ pub trait JobIdGenerator: Sync + Send {
 /// A monotonically increasing sortable snowflake job id generator
 /// which does not capture machine id as part result.
 pub(crate) struct DefaultJobGenerator {
-    generator: AtomicSnowflakeGenerator<SnowflakeMastodonId, MonotonicClock>,
+    generator: AtomicSnowflakeGenerator<SnowflakeMastodonId, CachedClock>,

Review Comment:
   The `CachedClock` is mimicking the previous behavior of `MonotonicClock`. 
The only exception is that the new clock can be adjusted to system wall time, 
but this behavior is still handled with the generator which will wait for the 
time to catch back up. So no functional changes.
   
   I'd recommend `DirectClock` for low(er) throughput/low power devices where 
generating IDs is not a frequent occurrence. If you think you will not be 
generating many IDs _per millisecond_, then DirectClock can be a good choice 
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]


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

Reply via email to