You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2022/10/29 02:59:35 UTC

[GitHub] [arrow-ballista] yahoNanJing commented on a diff in pull request #468: Add some validation for remove_job_data in the executor server

yahoNanJing commented on code in PR #468:
URL: https://github.com/apache/arrow-ballista/pull/468#discussion_r1008614987


##########
ballista/executor/src/executor_server.rs:
##########
@@ -720,13 +720,45 @@ impl<T: 'static + AsLogicalPlan, U: 'static + AsExecutionPlan> ExecutorGrpc
         request: Request<RemoveJobDataParams>,
     ) -> Result<Response<RemoveJobDataResult>, Status> {
         let job_id = request.into_inner().job_id;
+        info!("Remove data for job {:?}", job_id);
+
+        // Verify whether it's a legal job id
+        {
+            if job_id.is_empty() {
+                return Err(Status::internal(
+                    "Job id should not be empty!!!".to_string(),
+                ));
+            }
+            if job_id.contains('.') {

Review Comment:
   It's for prevent deleting parent directory. Generally, a directory should not contain '.'



-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org