You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ignite.apache.org by Данилов Семён <sa...@yandex.ru> on 2022/05/31 15:24:44 UTC

Control.sh command that schedules index rebuild in the maintenance mode

Hello, igniters!

I want to propose a new control.sh cache sub-command that schedules a rebuild of cache indexes in the maintenance mode. 
We already have a force rebuild command but sometimes (for example, under load) user may want to first stop the node and then rebuild indexes.
For this scenario we can add a command that creates a maintenance task and then after restart node will enter the maintenance mode and rebuild specified indexes.

I propose the following API:
--cache schedule_indexes_rebuild --node-id nodeId --target cacheName1=index1,...indexN
     Schedules rebuild of the indexes for specified caches via the Maintenance Mode.

     Parameters:
        --node-id - (Optional) Specify node for indexes rebuild.
        --target    - Cache name with optionally specified indexes. If indexes are not specified then all indexes of the cache will be scheduled for the rebuild operation.

As you can see, the user can provide a node id to schedule the rebuild on a specific node (otherwise the rebuild will be scheduled for all of the nodes) and targets (specific indexes of a cache or all of the indexes of a cache).
There is a ticket[1] and a pull request[2] for my proposal.

WDYT?

Kind regards,
Semyon.

[1] https://issues.apache.org/jira/browse/IGNITE-17002
[2] https://github.com/apache/ignite/pull/10042


Re: Control.sh command that schedules index rebuild in the maintenance mode

Posted by Данилов Семён <sa...@yandex.ru>.
Hello, Nikolay!

Online rebuild causes unpredictable behaviour of the indexed SQL queries. For example, if a query plan requires an index scan, we will instead resort to the full scan which is unacceptable for some users. So sometimes it’s better to shutdown the node than mess up the application.

Kind regards, Semyon.

> Hello, Семен.
> 
> Why index rebuild should be done in maintenance mode?
> 
>> 31 мая 2022 г., в 18:24, Данилов Семён <sa...@yandex.ru> написал(а):
>>
>> Hello, igniters!
>>
>> I want to propose a new control.sh cache sub-command that schedules a rebuild of cache indexes in the maintenance mode.
>> We already have a force rebuild command but sometimes (for example, under load) user may want to first stop the node and then rebuild indexes.
>> For this scenario we can add a command that creates a maintenance task and then after restart node will enter the maintenance mode and rebuild specified indexes.
>>
>> I propose the following API:
>> --cache schedule_indexes_rebuild --node-id nodeId --target cacheName1=index1,...indexN
>> Schedules rebuild of the indexes for specified caches via the Maintenance Mode.
>>
>> Parameters:
>> --node-id - (Optional) Specify node for indexes rebuild.
>> --target - Cache name with optionally specified indexes. If indexes are not specified then all indexes of the cache will be scheduled for the rebuild operation.
>>
>> As you can see, the user can provide a node id to schedule the rebuild on a specific node (otherwise the rebuild will be scheduled for all of the nodes) and targets (specific indexes of a cache or all of the indexes of a cache).
>> There is a ticket[1] and a pull request[2] for my proposal.
>>
>> WDYT?
>>
>> Kind regards,
>> Semyon.
>>
>> [1] https://issues.apache.org/jira/browse/IGNITE-17002
>> [2] https://github.com/apache/ignite/pull/10042

Re: Control.sh command that schedules index rebuild in the maintenance mode

Posted by Николай Ижиков <ni...@apache.org>.
Hello, Семен.

Why index rebuild should be done in maintenance mode?

> 31 мая 2022 г., в 18:24, Данилов Семён <sa...@yandex.ru> написал(а):
> 
> Hello, igniters!
> 
> I want to propose a new control.sh cache sub-command that schedules a rebuild of cache indexes in the maintenance mode. 
> We already have a force rebuild command but sometimes (for example, under load) user may want to first stop the node and then rebuild indexes.
> For this scenario we can add a command that creates a maintenance task and then after restart node will enter the maintenance mode and rebuild specified indexes.
> 
> I propose the following API:
> --cache schedule_indexes_rebuild --node-id nodeId --target cacheName1=index1,...indexN
>     Schedules rebuild of the indexes for specified caches via the Maintenance Mode.
> 
>     Parameters:
>        --node-id - (Optional) Specify node for indexes rebuild.
>        --target    - Cache name with optionally specified indexes. If indexes are not specified then all indexes of the cache will be scheduled for the rebuild operation.
> 
> As you can see, the user can provide a node id to schedule the rebuild on a specific node (otherwise the rebuild will be scheduled for all of the nodes) and targets (specific indexes of a cache or all of the indexes of a cache).
> There is a ticket[1] and a pull request[2] for my proposal.
> 
> WDYT?
> 
> Kind regards,
> Semyon.
> 
> [1] https://issues.apache.org/jira/browse/IGNITE-17002
> [2] https://github.com/apache/ignite/pull/10042
>