Repository navigation
[core] Update GCS timing-related logic to use ClockInterface - #62502
Conversation
Signed-off-by: Edward Oakes <[email protected]>
Signed-off-by: Edward Oakes <[email protected]>
Signed-off-by: Edward Oakes <[email protected]>
Signed-off-by: Edward Oakes <[email protected]>
Signed-off-by: Edward Oakes <[email protected]>
There was a problem hiding this comment.
Code Review
This pull request refactors the GCS (Global Control Service) components to use a centralized ClockInterface instead of direct calls to absl::Now() or current_sys_time_ms(). This change facilitates better testing by allowing for clock mocking. The refactoring involves updating constructors and method signatures across numerous GCS managers (Actor, Job, Node, Placement Group, etc.) and store clients to accept a clock reference. A high-severity issue was identified in RedisDelKeyPrefixSync where a stack-allocated clock is passed by reference to a shared context, potentially leading to a dangling reference if the context outlives the function scope.
Signed-off-by: Edward Oakes <[email protected]>
Signed-off-by: Edward Oakes <[email protected]>
Signed-off-by: Edward Oakes <[email protected]>
Signed-off-by: Edward Oakes <[email protected]>
Signed-off-by: Edward Oakes <[email protected]>
Signed-off-by: Edward Oakes <[email protected]>
Signed-off-by: Edward Oakes <[email protected]>
Signed-off-by: Edward Oakes <[email protected]>
Signed-off-by: Edward Oakes <[email protected]>
Signed-off-by: Edward Oakes <[email protected]>
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
There are 2 total unresolved issues (including 1 from previous review).
Reviewed by Cursor Bugbot for commit c3ca1f3. Configure here.
| auto end_to_end_creation_latency_us = | ||
| absl::Nanoseconds(scheduling_done_ns - request_received_ns) / absl::Microseconds(1); | ||
| ASSERT_TRUE(placement_group->GetStats().scheduling_latency_us() < | ||
| ASSERT_TRUE(placement_group->GetStats().scheduling_latency_us() <= |
There was a problem hiding this comment.
now that we control time shouldn't this be equal all the time? <= kind of contradicts the comment you made at line 1223
Signed-off-by: Edward Oakes <[email protected]>
Signed-off-by: Edward Oakes <[email protected]>
Signed-off-by: Edward Oakes <[email protected]>
|
cursor review |
Sparks0219
left a comment
There was a problem hiding this comment.
LGTM, looks like there's a couple merge conflicts though
…roject#62502) - Update gcs components to use the interface introduced in: ray-project#62476 - Updated tests to use `FakeClock` - Added additional convenience methods to `ClockInterface` --------- Signed-off-by: Edward Oakes <[email protected]> Signed-off-by: Alexandr Plashchinsky <[email protected]>

ClockInterfaceand fake clock for testing #62476FakeClockClockInterface