Skip to content

IGNITE-27857 Set job status to COMPLETED when job ran to completion#7744

Open
valepakh wants to merge 3 commits intoapache:mainfrom
unisonteam:IGNITE-27857
Open

IGNITE-27857 Set job status to COMPLETED when job ran to completion#7744
valepakh wants to merge 3 commits intoapache:mainfrom
unisonteam:IGNITE-27857

Conversation

@valepakh
Copy link
Contributor

@ptupitsyn ptupitsyn requested a review from Copilot March 10, 2026 14:15
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates compute job cancellation semantics so that jobs that finish successfully after a cancel request are marked COMPLETED (cooperative cancellation), while jobs that explicitly signal cancellation (e.g., via CancellationException) are CANCELED.

Changes:

  • Treat “cancel requested but job completed normally” as COMPLETED in the compute queue executor.
  • Update multiple tests/jobs to throw CancellationException on interruption when cancellation should be reflected as CANCELED.
  • Add a new cancel-aware sleep job and extend event/state assertions for cancellation scenarios.

Reviewed changes

Copilot reviewed 11 out of 11 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
modules/sql-engine/src/integrationTest/java/org/apache/ignite/internal/sql/engine/systemviews/ItComputeSystemViewTest.java Adjusts interruption handling in a long-running test job to throw CancellationException.
modules/runner/src/integrationTest/java/org/apache/ignite/internal/runner/app/client/ItThinClientComputeTest.java Updates interrupt handling to map interruption to CancellationException for cancellation tests.
modules/rest/src/integrationTest/java/org/apache/ignite/internal/rest/compute/ItComputeControllerTest.java Aligns REST compute cancellation behavior with cancel-aware interruption semantics.
modules/compute/src/test/java/org/apache/ignite/internal/compute/queue/PriorityQueueExecutorTest.java Updates queue executor tests to treat interruption as cancellation via CancellationException.
modules/compute/src/test/java/org/apache/ignite/internal/compute/executor/ComputeExecutorTest.java Updates expected job status to COMPLETED for cooperative cancellation; adds cancel-aware cancellation test.
modules/compute/src/test/java/org/apache/ignite/internal/compute/ComputeComponentImplTest.java Updates expectation to COMPLETED when job completes normally after cancel request.
modules/compute/src/main/java/org/apache/ignite/internal/compute/queue/QueueExecutionImpl.java Changes completion logic to always mark normally-finished jobs as COMPLETED even if cancellation was requested.
modules/compute/src/jobs/java/org/example/jobs/standalone/CancelAwareSleepJob.java Adds a standalone cancel-aware sleep job used for cancellation scenarios.
modules/compute/src/integrationTest/java/org/example/jobs/embedded/CancelAwareSleepJob.java Adds an embedded cancel-aware sleep job used in integration tests.
modules/compute/src/integrationTest/java/org/apache/ignite/internal/compute/events/ItComputeEventsTest.java Extends event assertions for cooperative vs cancel-aware cancellation; adds a cancel-aware job test.
modules/compute/src/integrationTest/java/org/apache/ignite/internal/compute/ItComputeBaseTest.java Switches cancellation tests to use the cancel-aware sleep job and updates expected outcomes.
Comments suppressed due to low confidence (1)

modules/compute/src/integrationTest/java/org/apache/ignite/internal/compute/ItComputeBaseTest.java:1

  • The test name cancelsNotCancellableJob no longer matches the asserted behavior (job completes normally with COMPLETED). Rename the test to reflect cooperative cancellation semantics (e.g., cancelRequestedButJobCompletesNormally), or adjust assertions if the intent is still to validate a non-cancellable/canceled outcome.
/*

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants