Repository navigation
Conversation
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
6b6c4f0 to
6ec8cbb
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 913a17f. Configure here.
|
|
||
| /// Return true if this task consumes the argument at the given index, which was | ||
| /// created with consume_once. | ||
| bool ArgIsMove(size_t arg_index) const; |
There was a problem hiding this comment.
New APIs missing Doxygen tags
Low Severity
/** ... */ block comments using @ tags (@brief, and @param/@return where applicable). ArgIsMove and SetArgIsMove have brief comments but omit @param/@return for arg_index and the return value.
Additional Locations (1)
Triggered by project rule: Bugbot Rules
Reviewed by Cursor Bugbot for commit 913a17f. Configure here.
There was a problem hiding this comment.
Code Review
This pull request introduces tracking for arguments that are consumed (moved) by a task (created with consume_once). It adds an is_move field to the TaskArg protobuf message, updates ReferenceCounter::TryCommitMoves to return a list of booleans indicating which arguments were moved, and ensures that is_move is cleared if an argument is inlined during dependency resolution. It also includes corresponding unit tests and updates to task building and submission. I have no feedback to provide as there are no review comments.
913a17f to
d4703ac
Compare
| ASSERT_TRUE(dependencies_resolved.get_future().get()); | ||
| ASSERT_TRUE(ok); | ||
| ASSERT_TRUE(task.ArgByRef(0)); | ||
| // An argument that stays in plasma keeps is_move. |
| ASSERT_FALSE(task.ArgByRef(1)); | ||
| ASSERT_NE(task.ArgData(0), nullptr); | ||
| ASSERT_NE(task.ArgData(1), nullptr); | ||
| // An inlined argument is not moved. |
| } | ||
|
|
||
| mutable_arg->set_is_inlined(true); | ||
| // The value is now in the task spec (inlined), so there is nothing to move. |
There was a problem hiding this comment.
We should document this, for in-lined objects it's a no-op
| move_state); | ||
| return id; | ||
| }; | ||
| ObjectID plain = add_owned_object(MoveState::NOT_MOVABLE); |
There was a problem hiding this comment.
can you rename plain to not_movable
|
|
||
| // A repeated ID is moved once; NOT_MOVABLE and unknown IDs are left alone. | ||
| ASSERT_TRUE(rc->TryCommitMoves({plain, movable_1, movable_1, unknown}).ok()); | ||
| // A repeated ID is moved once and both entries are reported as moves; NOT_MOVABLE |
There was a problem hiding this comment.
can you clarify the state machine for MOVABLE here, would help
cbe3351 to
95c6f8b
Compare
Signed-off-by: kartica.modi <kartica.modi@anyscale.com>
Signed-off-by: kartica.modi <kartica.modi@anyscale.com>
95c6f8b to
2ae4e61
Compare


This is PR 3 of a series of PRs to implement move semantics for plasma objects in core.
The complete design doc is here: https://docs.google.com/document/d/1ZJhgRmwVyKfNCR21CWf6xMcc0B6HJwSPQsfebTRvnnE/edit?tab=t.0#heading=h.7wcod1f9afpg
This marks each consume-once argument of an actor task with a new
TaskArg.is_moveflag in the task spec. After #66767, passing a consume-once ref to an actor task changes its state toMOVED; this PR records the same fact in the task spec, so that the consumer's raylet can later pull the object as a move instead of a copy. Nothing reads the flag yet: the consumer side comes in the next PRs.Changes
TaskArg.is_move. True when the task consumes the argument, which was created with_consume_once=True. Only set on pass-by-ref arguments. Arguments that aren't consume-once add nothing on the wire.ReferenceCounter::TryCommitMovesreturns which args it moved. Its return type changes fromStatustoStatusOr<std::vector<bool>>: on success, one entry per arg ID, true if this call moved the object (it wasMOVABLE). The entries are filled in the validation pass, so both entries of a repeated arg (c.remote(r, r), allowed by [core][move semantics][2/n] Change state to moved on consumption and add enforcements #66767) are true.NOT_MOVABLEargs are false. On rejection (an arg alreadyMOVED) it returns the sameInvalidArgumentas before.SubmitActorTasksets the flag. The commit loop also records each by-ref arg's index. After the task spec is built, the moved indices getTaskSpecBuilder::SetArgIsMove(i)(new). The proto arg order is theargsorder, so the indices line up.TaskSpecification::ArgIsMove(i), for the consumer side in the next PRs.InlineDependencies). There's nothing to pull or pin, soInlineDependenciesclearsis_move. An object in plasma stays by-ref and keeps the flag. (Tensor-transport args, which keep theirobject_refwhen inlined, can't be consume-once: [core][move semantics][1/n] Adding consume_once flag in actor methods #66620 rejects_consume_oncewithtensor_transport.)is_move.Stack created with GitHub Stacks CLI • Give Feedback 💬