File tree Expand file tree Collapse file tree 2 files changed +5
-1
lines changed
src/java/org/apache/cassandra/cql3/statements Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Original file line number Diff line number Diff line change 115.1
2+ * Calculate once and cache the result of ModificationStatement#requiresRead as a perf optimization (CASSANDRA-21040)
23 * Update system schema tables with new distributed keyspace on upgrade (CASSANDRA-20872)
34 * Fix issue when running cms reconfiguration with paxos repair disabled (CASSANDRA-20869)
45 * Added additional parameter to JVM shutdown to allow for logs to be properly shutdown (CASSANDRA-20978)
Original file line number Diff line number Diff line change @@ -158,6 +158,8 @@ public abstract class ModificationStatement implements CQLStatement.SingleKeyspa
158158
159159 private final Operations operations ;
160160
161+ private final boolean isReadRequired ;
162+
161163 private final RegularAndStaticColumns updatedColumns ;
162164
163165 protected final Conditions conditions ;
@@ -262,6 +264,7 @@ else if (this.type.isDelete())
262264 this .conditionColumns = conditionColumnsBuilder .build ();
263265 this .requiresRead = requiresReadBuilder .build ();
264266 this .functions = findAllFunctions ();
267+ this .isReadRequired = operations .requiresRead ();
265268 }
266269
267270 @ Override
@@ -536,7 +539,7 @@ public boolean requiresRead()
536539 // * Deleting list element by value
537540 // * Performing addition on a StringType (i.e. concatenation, only supported for CAS operations)
538541 // * Performing addition on a NumberType, again only supported for CAS operations.
539- return operations . requiresRead () ;
542+ return isReadRequired ;
540543 }
541544
542545 private Map <DecoratedKey , Partition > readRequiredLists (Collection <ByteBuffer > partitionKeys ,
You can’t perform that action at this time.
0 commit comments