Skip to content

Commit

Permalink
Remove MatchingEngineStateManager::remove_operation (#1119)
Browse files Browse the repository at this point in the history
We don't actually need this API, since the StateManager can now
own the output struct, which means it controls the Drop function.
  • Loading branch information
allada committed Jul 9, 2024
1 parent 34dea06 commit 2fa4fee
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 9 deletions.
5 changes: 0 additions & 5 deletions nativelink-scheduler/src/operation_state_manager.rs
Original file line number Diff line number Diff line change
Expand Up @@ -144,9 +144,4 @@ pub trait MatchingEngineStateManager: Sync + Send + 'static {
operation_id: &OperationId,
worker_id_or_reason_for_unsassign: Result<&WorkerId, Error>,
) -> Result<(), Error>;

/// Remove an operation from the state manager.
/// It is important to use this function to remove operations
/// that are no longer needed to prevent memory leaks.
async fn remove_operation(&self, operation_id: OperationId) -> Result<(), Error>;
}
4 changes: 0 additions & 4 deletions nativelink-scheduler/src/scheduler_state/state_manager.rs
Original file line number Diff line number Diff line change
Expand Up @@ -999,8 +999,4 @@ impl MatchingEngineStateManager for StateManager {
};
inner.inner_update_operation(operation_id, maybe_worker_id, stage_result)
}

async fn remove_operation(&self, _operation_id: OperationId) -> Result<(), Error> {
todo!()
}
}

0 comments on commit 2fa4fee

Please sign in to comment.