rpuch commented on code in PR #1405: URL: https://github.com/apache/ignite-3/pull/1405#discussion_r1048113376
########## modules/storage-page-memory/src/main/java/org/apache/ignite/internal/storage/pagememory/mv/BlobStorage.java: ########## @@ -0,0 +1,341 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.ignite.internal.storage.pagememory.mv; + +import java.util.Objects; +import org.apache.ignite.internal.pagememory.PageIdAllocator; +import org.apache.ignite.internal.pagememory.PageMemory; +import org.apache.ignite.internal.pagememory.datastructure.DataStructure; +import org.apache.ignite.internal.pagememory.io.PageIo; +import org.apache.ignite.internal.pagememory.metric.IoStatisticsHolder; +import org.apache.ignite.internal.pagememory.metric.IoStatisticsHolderNoOp; +import org.apache.ignite.internal.pagememory.reuse.LongListReuseBag; +import org.apache.ignite.internal.pagememory.reuse.ReuseBag; +import org.apache.ignite.internal.pagememory.reuse.ReuseList; +import org.apache.ignite.internal.pagememory.util.PageHandler; +import org.apache.ignite.internal.pagememory.util.PageLockListenerNoOp; +import org.apache.ignite.internal.storage.pagememory.mv.io.BlobDataIo; +import org.apache.ignite.internal.storage.pagememory.mv.io.BlobFirstIo; +import org.apache.ignite.internal.storage.pagememory.mv.io.BlobIo; +import org.apache.ignite.lang.IgniteInternalCheckedException; +import org.jetbrains.annotations.Nullable; + +/** + * Used to store a limited number of blobs (just byte arrays) per partition. Each blob is stored in a sequence + * of pages forming a linked list (a previous page links to the next one). + * + * <p>If a lot of blobs (comparable with the number of rows) needs to be stored in a partition, another mechanism + * (probably using a {@link org.apache.ignite.internal.pagememory.freelist.FreeList}) should be used. + */ +public class BlobStorage { Review Comment: The main reason is that I didn't know that I would benefit from extending `DataStructure`. I reused page recycling from there, what other conveniences would be useful here? -- 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]
