tkalkirill commented on code in PR #812:
URL: https://github.com/apache/ignite-3/pull/812#discussion_r882310427
##########
modules/page-memory/src/main/java/org/apache/ignite/internal/pagememory/persistence/PageMemoryImpl.java:
##########
@@ -219,37 +211,38 @@ public class PageMemoryImpl implements PageMemoryEx {
* Constructor.
*
* @param directMemoryProvider Memory allocator to use.
- * @param dataRegionCfg Data region configuration.
+ * @param dataRegionConfig Data region configuration.
* @param ioRegistry IO registry.
* @param sizes Segments sizes, the last one being the checkpoint buffer
size.
* @param pmPageMgr Page store manager.
* @param changeTracker Callback invoked to track changes in pages.
* @param flushDirtyPage Write callback invoked when a dirty page is
removed for replacement.
+ * @param pageSize Page size in bytes.
*/
public PageMemoryImpl(
DirectMemoryProvider directMemoryProvider,
- PageMemoryDataRegionConfiguration dataRegionCfg,
+ PageMemoryDataRegionConfiguration dataRegionConfig,
PageIoRegistry ioRegistry,
long[] sizes,
PageReadWriteManager pmPageMgr,
@Nullable PageChangeTracker changeTracker,
- PageStoreWriter flushDirtyPage
+ PageStoreWriter flushDirtyPage,
+ // TODO: IGNITE-17017 Move to common config
+ int pageSize
) {
this.directMemoryProvider = directMemoryProvider;
- this.dataRegionCfg = dataRegionCfg.value();
+ this.dataRegionConfigView = dataRegionConfig.value();
this.ioRegistry = ioRegistry;
this.sizes = sizes;
this.pmPageMgr = pmPageMgr;
this.changeTracker = changeTracker;
this.flushDirtyPage = flushDirtyPage;
- int pageSize = this.dataRegionCfg.pageSize();
-
sysPageSize = pageSize + PAGE_OVERHEAD;
rwLock = new OffheapReadWriteLock(128);
- String replacementMode = this.dataRegionCfg.replacementMode();
+ String replacementMode = this.dataRegionConfigView.replacementMode();
Review Comment:
fix it
##########
modules/page-memory/src/main/java/org/apache/ignite/internal/pagememory/persistence/PageMemoryImpl.java:
##########
@@ -268,7 +261,7 @@ public PageMemoryImpl(
throw new IgniteInternalException("Unexpected page replacement
mode: " + replacementMode);
}
- delayedPageReplacementTracker =
getBoolean(IGNITE_DELAYED_REPLACED_PAGE_WRITE, true)
+ delayedPageReplacementTracker =
dataRegionConfig.delayedReplacedPageWrite().value()
Review Comment:
fix it
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]