dcapwell commented on code in PR #4509:
URL: https://github.com/apache/cassandra/pull/4509#discussion_r2590239063


##########
src/java/org/apache/cassandra/cql3/UpdateParameters.java:
##########
@@ -108,20 +105,8 @@ public <V> void newRow(Clustering<V> clustering) throws 
InvalidRequestException
                     throw new InvalidRequestException("Invalid empty or null 
value for column " + metadata.clusteringColumns().get(0).name);
             }
         }
-
-        if (clustering == Clustering.STATIC_CLUSTERING)
-        {
-            if (staticBuilder == null)
-                staticBuilder = BTreeRow.pooledUnsortedBuilder();
-            builder = staticBuilder;
-        }
-        else
-        {
-            if (regularBuilder == null)
-                regularBuilder = BTreeRow.pooledUnsortedBuilder();
-            builder = regularBuilder;

Review Comment:
   this is the core bug, added a regression test that shows it
   
   you can create a update that touches 2 different rows.  If the first row is 
success, we call `buildRow` and return to the pool.  The second row then reuses 
the builder (even though it was added to the pool)!
   
   Now, if the second row fails (constraints framework, `Lists` rejecting 
existing state, etc.), then we put the builder in a bad state... and its still 
referenced by the pool.



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to