Vladimir Steshin created IGNITE-19977:
-----------------------------------------

             Summary: Defragmentation is now allowed to use 1 thread.
                 Key: IGNITE-19977
                 URL: https://issues.apache.org/jira/browse/IGNITE-19977
             Project: Ignite
          Issue Type: Bug
            Reporter: Vladimir Steshin
            Assignee: Vladimir Steshin



{code:java}
/**
     * Sets maximum number of partitions which can be defragmented at the same 
time.
     *
     * @param defragmentationThreadPoolSize Maximum number of partitions which 
can be defragmented at the same time.
     *      Default is {@link 
DataStorageConfiguration#DFLT_DEFRAGMENTATION_THREAD_POOL_SIZE}.
     * @return {@code this} for chaining.
     */
    public DataStorageConfiguration setDefragmentationThreadPoolSize(int 
defragmentationThreadPoolSize) {
        A.ensure(defragmentationThreadPoolSize > 1, "Defragmentation thread 
pool size must be greater or equal to 1.");

        this.defragmentationThreadPoolSize = defragmentationThreadPoolSize;

        return this;
    }
{code}

should compare with 0:

{code:java}
A.ensure(defragmentationThreadPoolSize > 0, "Defragmentation thread pool size 
must be greater or equal to 1.");
{code}

Defragmentation actually works with just 1 thread. Also, 1 thread seems to be a 
workaround for https://issues.apache.org/jira/browse/IGNITE-19904 . I couldn't 
detect the failure with one defragmentation worker. 




--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to