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


##########
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:
   One small follow-up on the clock thread. The old `MonotonicClock` ignored 
backward wall-clock jumps, but `CachedClock` follows them and the generator 
waits until time catches up. So after an NTP step backwards, `next_id` would 
stall job submission for the size of the jump. That's probably rare in 
practice, but it is a behavior change. Given how few IDs we generate, would 
`DirectClock` be a simpler fit? It also avoids the 1ms background thread. Happy 
either way, just want to make sure we picked it on purpose.



##########
Cargo.lock:
##########
@@ -3390,10 +3390,21 @@ version = "2.0.0"
 source = "registry+https://github.com/rust-lang/crates.io-index";
 checksum = "ee93edf3c501f0035bbeffeccfed0b79e14c311f12195ec0e661e114a0f60da4"
 dependencies = [
- "futures",
  "portable-atomic",
- "rand 0.10.4",
- "tokio",
+ "rand 0.10.3",

Review Comment:
   It looks like `Cargo.lock` got mangled in the merge with `main`. The 
`ferroid 2.0.0` entry now depends on `rand 0.10.3`, but the only `rand 0.10` 
package in the lockfile is `0.10.4`, so every `--locked` job fails. Could you 
reset `Cargo.lock` to `main` and run `cargo check -p ballista-scheduler` to 
regenerate it? That should get CI green.



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