JingsongLi commented on code in PR #1649:
URL: https://github.com/apache/incubator-paimon/pull/1649#discussion_r1273488433


##########
paimon-core/src/main/java/org/apache/paimon/memory/MemoryPoolFactory.java:
##########
@@ -28,15 +32,26 @@ public class MemoryPoolFactory {
 
     private final MemorySegmentPool innerPool;
     private final int totalPages;
-    private final Iterable<MemoryOwner> owners;
 
-    public MemoryPoolFactory(MemorySegmentPool innerPool, 
Iterable<MemoryOwner> owners) {
+    private Iterable<MemoryOwner> owners;
+
+    public MemoryPoolFactory(MemorySegmentPool innerPool) {
         this.innerPool = innerPool;
         this.totalPages = innerPool.freePages();
-        this.owners = owners;
+    }
+
+    public MemoryPoolFactory addOwners(Iterable<MemoryOwner> newOwners) {
+        if (this.owners == null) {
+            this.owners = newOwners;

Review Comment:
   add test here.
   
   here should store `List<Iterable<MemoryOwner>>`.
   If there is a new write generated later, it will not enter this factory



-- 
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]

Reply via email to