[
https://issues.apache.org/jira/browse/IGNITE-22107?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17851925#comment-17851925
]
Roman Puchkovskiy commented on IGNITE-22107:
--------------------------------------------
The patch looks good to me
> Properly encapsulate partition meta
> -----------------------------------
>
> Key: IGNITE-22107
> URL: https://issues.apache.org/jira/browse/IGNITE-22107
> Project: Ignite
> Issue Type: Improvement
> Reporter: Ivan Bessonov
> Assignee: Stanislav Markin
> Priority: Major
> Labels: ignite-3
> Fix For: 3.0.0-beta2
>
> Time Spent: 3h 50m
> Remaining Estimate: 0h
>
> {{PartitionMeta}} and {{PartitionMetaIo}} leak specific implementation
> details, specifically - all fields except for {{{}pageCount{}}}. This breaks
> encapsulation and makes {{page-memory}} module code non-reusable.
> I propose splitting meta into 2 parts - abstract meta, that would only hold
> page count, and specific meta that will be located in a different module,
> close to the implementation.
> In this case, we would have to pass meta IO as parameters into methods like
> {{{}PartitionMetaManager#readOrCreateMeta{}}}, and create a getter for IO in
> {{AbstractPartitionMeta}} class itself, but that's a necessary sacrifice.
> Some other places will be affected as well, mostly tests.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)