milenkovicm commented on code in PR #2037:
URL: 
https://github.com/apache/datafusion-ballista/pull/2037#discussion_r3582770876


##########
ballista/scheduler/src/state/task_manager.rs:
##########
@@ -655,67 +664,117 @@ impl<T: 'static + AsLogicalPlan, U: 'static + 
AsExecutionPlan> TaskManager<T, U>
         Ok(events)
     }
 
+    /// Save a terminal job snapshot and remove it from the active cache.
+    pub(crate) async fn persist_terminal_and_evict(
+        &self,
+        job_id: &JobId,
+        snapshot: &ExecutionGraphBox,
+    ) -> Result<()> {
+        if let Some(mut job_info) = self.active_job_cache.get_mut(job_id) {
+            job_info.status = snapshot.status().status.clone();
+        }
+
+        let mut attempt = 0;
+        let save_result = loop {

Review Comment:
   would it make sense to have this retry loop be implemented as part of job 
state implementation? some job state implementations might be retriable some 
not, i believe its specific to implementation, and it might  not make sense to 
me to have retry logic 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