[
https://issues.apache.org/jira/browse/IGNITE-21479?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Aleksandr Polovtcev updated IGNITE-21479:
-----------------------------------------
Description:
This test is flaky because of the following race. It tests the following
scenario:
# Task 1 is submitted with priority 10;
# Task 2 is submitted with priority 5;
# Task 3 is submitted with priority 1;
# Task 4 is submitted with priority 5;
# Task 3 priority is changed to 20;
# The following execution order is expected: 1 - 3 - 2 - 4.
The main caveat here that Task 1 will always be executed first, because it is
the first task in the pool and will be dispatched on the first thread
immediately, bypassing the queue. Therefore, with the current implementation
there's the following race:
# Task 1 finishes executing;
# After that either Task 3 changes its priority and gets taken for execution, or
# Task 2 gets taken for execution, because Task 3 hasn't yet changed its
priority.
> PriorityQueueExecutorTest#testChangePriorityInTheMiddleExecution is flaky
> -------------------------------------------------------------------------
>
> Key: IGNITE-21479
> URL: https://issues.apache.org/jira/browse/IGNITE-21479
> Project: Ignite
> Issue Type: Bug
> Reporter: Aleksandr Polovtcev
> Assignee: Aleksandr Polovtcev
> Priority: Major
> Labels: ignite-3
> Fix For: 3.0.0-beta2
>
>
> This test is flaky because of the following race. It tests the following
> scenario:
> # Task 1 is submitted with priority 10;
> # Task 2 is submitted with priority 5;
> # Task 3 is submitted with priority 1;
> # Task 4 is submitted with priority 5;
> # Task 3 priority is changed to 20;
> # The following execution order is expected: 1 - 3 - 2 - 4.
> The main caveat here that Task 1 will always be executed first, because it is
> the first task in the pool and will be dispatched on the first thread
> immediately, bypassing the queue. Therefore, with the current implementation
> there's the following race:
> # Task 1 finishes executing;
> # After that either Task 3 changes its priority and gets taken for execution,
> or
> # Task 2 gets taken for execution, because Task 3 hasn't yet changed its
> priority.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)