[ https://issues.apache.org/jira/browse/IGNITE-22107?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Ivan Bessonov updated IGNITE-22107: ----------------------------------- Description: {{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. was: `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. > Properly encapsulate partition meta > ----------------------------------- > > Key: IGNITE-22107 > URL: https://issues.apache.org/jira/browse/IGNITE-22107 > Project: Ignite > Issue Type: Improvement > Reporter: Ivan Bessonov > Priority: Major > Labels: ignite-3 > Fix For: 3.0.0-beta2 > > > {{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)