You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@beam.apache.org by "TSultanov (via GitHub)" <gi...@apache.org> on 2023/01/31 13:18:16 UTC

[GitHub] [beam] TSultanov commented on a diff in pull request #25078: [Playground] Fix crash when example pipeline execution times out

TSultanov commented on code in PR #25078:
URL: https://github.com/apache/beam/pull/25078#discussion_r1091913260


##########
playground/backend/internal/code_processing/code_processing.go:
##########
@@ -399,13 +399,13 @@ func cancelCheck(ctx context.Context, pipelineId uuid.UUID, cancelChannel chan b
 			return
 		case <-ticker.C:
 			cancel, err := cacheService.GetValue(ctx, pipelineId, cache.Canceled)
-			if err != nil {
-				logger.Errorf("%s: Error during getting value from the cache: %s", pipelineId, err.Error())
-			}
-			if cancel.(bool) {
+			if err == context.DeadlineExceeded || (err == nil && cancel.(bool)) {
 				cancelChannel <- true
 				return
 			}

Review Comment:
   We are: https://github.com/apache/beam/blob/2e5633285849f8d9249b435881e7345bf2bc2c89/playground/backend/internal/code_processing/code_processing.go#L60
   
   the code in question additionally polls if cancellation was requested through the API: https://github.com/apache/beam/blob/2e5633285849f8d9249b435881e7345bf2bc2c89/playground/backend/cmd/server/controller.go#L309



-- 
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@beam.apache.org

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