[ 
https://issues.apache.org/jira/browse/IGNITE-21718?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Aleksandr Polovtcev updated IGNITE-21718:
-----------------------------------------
    Description: 
{{AbstractPageMemoryMvPartitionStorage}} contains a bunch of volatile fields 
that get replaced during a rebalance cleanup. I propose to wrap this fields in 
a single class in order to make the code a little bit more maintainable. I see 
the following benefits:

# It will become easy to understand, what components of the storage may be 
updated;
# It will be easier to add more volatile components and not forget to update 
them;
# It will become easier to avoid unnecessary volatile reads, because the whole 
state can be fetched using a single read.
 
The only downside I can see is that the code may become a little bit more 
verbose, because you will need to access the state class first.

> Extract volatile state in AbstractPageMemoryMvPartitionStorage into a 
> separate class
> ------------------------------------------------------------------------------------
>
>                 Key: IGNITE-21718
>                 URL: https://issues.apache.org/jira/browse/IGNITE-21718
>             Project: Ignite
>          Issue Type: Improvement
>            Reporter: Aleksandr Polovtcev
>            Assignee: Aleksandr Polovtcev
>            Priority: Minor
>              Labels: ignite-3
>
> {{AbstractPageMemoryMvPartitionStorage}} contains a bunch of volatile fields 
> that get replaced during a rebalance cleanup. I propose to wrap this fields 
> in a single class in order to make the code a little bit more maintainable. I 
> see the following benefits:
> # It will become easy to understand, what components of the storage may be 
> updated;
> # It will be easier to add more volatile components and not forget to update 
> them;
> # It will become easier to avoid unnecessary volatile reads, because the 
> whole state can be fetched using a single read.
>  
> The only downside I can see is that the code may become a little bit more 
> verbose, because you will need to access the state class first.



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

Reply via email to