You are viewing a plain text version of this content. The canonical link for it is here.
Posted to pr@cassandra.apache.org by GitBox <gi...@apache.org> on 2022/06/24 14:04:39 UTC

[GitHub] [cassandra] blambov commented on a diff in pull request #1646: Cassandra 15511 4.0

blambov commented on code in PR #1646:
URL: https://github.com/apache/cassandra/pull/1646#discussion_r906062519


##########
src/java/org/apache/cassandra/db/rows/ColumnData.java:
##########
@@ -200,8 +200,9 @@ public ColumnData retain(ColumnData existing)
 
         public void close()
         {
-            pool.offer(this);
+            activeDeletion = null;
             modifier = null;
+            pool.offer(this);
             pool = null;

Review Comment:
   This could still race with the pool being set by another thread. Copy locally, clear and then offer.



##########
src/java/org/apache/cassandra/db/partitions/AtomicBTreePartition.java:
##########
@@ -433,6 +431,13 @@ public ColumnData apply(ColumnData insert)
             return insert;
         }
 
+        @Override
+        public void retain(ColumnData existing)
+        {
+            dataSize -= existing.dataSize();

Review Comment:
   This doesn't look right. If we retain, the size should not change. This should happen only if we delete.



-- 
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: pr-unsubscribe@cassandra.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org
For additional commands, e-mail: pr-help@cassandra.apache.org