You are viewing a plain text version of this content. The canonical link for it is here.
Posted to pr@cassandra.apache.org by "dcapwell (via GitHub)" <gi...@apache.org> on 2024/10/23 16:56:26 UTC
[PR] CASSANDRA-20020: Accord should block currently unsafe operations [cassandra]
dcapwell opened a new pull request, #3631:
URL: https://github.com/apache/cassandra/pull/3631
(no comment)
--
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
Re: [PR] CASSANDRA-20020: Accord should block currently unsafe operations [cassandra]
Posted by "aweisberg (via GitHub)" <gi...@apache.org>.
aweisberg commented on code in PR #3631:
URL: https://github.com/apache/cassandra/pull/3631#discussion_r1813398562
##########
src/java/org/apache/cassandra/cql3/statements/TransactionStatement.java:
##########
@@ -514,6 +518,10 @@ public CQLStatement prepare(ClientState state)
checkNotNull(select.parameters.refName, "Assignments must be named");
TxnDataName name = TxnDataName.user(select.parameters.refName);
checkTrue(selectNames.add(name), DUPLICATE_TUPLE_NAME_MESSAGE, name.name());
+ if (select.parameters.orderings != null && !select.parameters.orderings.isEmpty())
Review Comment:
Seems like maybe a bit of copy pasta forbidding things between `LET` selects and returning selects? Maybe the common forbidden things could be moved into a single shared method?
--
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
Re: [PR] CASSANDRA-20020: Accord should block currently unsafe operations [cassandra]
Posted by "aweisberg (via GitHub)" <gi...@apache.org>.
aweisberg commented on code in PR #3631:
URL: https://github.com/apache/cassandra/pull/3631#discussion_r1815275420
##########
src/java/org/apache/cassandra/cql3/statements/TransactionStatement.java:
##########
@@ -98,9 +98,13 @@ public class TransactionStatement implements CQLStatement.CompositeCQLStatement,
public static final String INCOMPLETE_PRIMARY_KEY_SELECT_MESSAGE = "SELECT must specify either all primary key elements or all partition key elements and LIMIT 1. In both cases partition key elements must be always specified with equality operators; %s %s";
public static final String NO_CONDITIONS_IN_UPDATES_MESSAGE = "Updates within transactions may not specify their own conditions; %s statement %s";
public static final String NO_TIMESTAMPS_IN_UPDATES_MESSAGE = "Updates within transactions may not specify custom timestamps; %s statement %s";
+ public static final String NO_TTLS_IN_UPDATES_MESSAGE = "Updates within transactions may not specify custom ttls; %s statement %s";
public static final String TRANSACTIONS_DISABLED_ON_TABLE_MESSAGE = "Accord transactions are disabled on table (See transactional_mode in table options); %s statement %s";
public static final String TRANSACTIONS_DISABLED_ON_TABLE_BEING_DROPPED_MESSAGE = "Accord transactions are disabled on table (table is being dropped); %s statement %s";
public static final String NO_COUNTERS_IN_TXNS_MESSAGE = "Counter columns cannot be accessed within a transaction; %s statement %s";
+ public static final String NO_AGGREGATION_IN_TXNS_MESSAGE = "No aggregation functions allowed within a transaction; %s statement %s";
+ public static final String NO_ORDER_BY_IN_TXNS_MESSAGE = "No ORDER BY clause allowed within a transaction; %s statement %s";
Review Comment:
We discussed this offline. There isn't really adequate testing of `ORDER BY` and while it does look like `ORDER BY` on the clustering key works any `ORDER BY` that requires post execution ordering or a `LIMIT` isn't handled correctly. It's fine to block it until we get things sorted out better.
--
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
Re: [PR] CASSANDRA-20020: Accord should block currently unsafe operations [cassandra]
Posted by "aweisberg (via GitHub)" <gi...@apache.org>.
aweisberg commented on PR #3631:
URL: https://github.com/apache/cassandra/pull/3631#issuecomment-2435655274
+1 to your review feedback commit
--
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
Re: [PR] CASSANDRA-20020: Accord should block currently unsafe operations [cassandra]
Posted by "aweisberg (via GitHub)" <gi...@apache.org>.
aweisberg commented on code in PR #3631:
URL: https://github.com/apache/cassandra/pull/3631#discussion_r1813425106
##########
test/unit/org/apache/cassandra/cql3/ast/Txn.java:
##########
@@ -244,6 +245,16 @@ public Builder addIf(If block)
return this;
}
+ public Builder addIf(Conditional conditional, Mutation... mutations)
+ {
+ return addIf(conditional, Arrays.asList(mutations));
+ }
+
+ public Builder addIf(Conditional conditional, List<Mutation> mutations)
Review Comment:
Is this supposed to be included?
--
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
Re: [PR] CASSANDRA-20020: Accord should block currently unsafe operations [cassandra]
Posted by "aweisberg (via GitHub)" <gi...@apache.org>.
aweisberg commented on code in PR #3631:
URL: https://github.com/apache/cassandra/pull/3631#discussion_r1813425106
##########
test/unit/org/apache/cassandra/cql3/ast/Txn.java:
##########
@@ -244,6 +245,16 @@ public Builder addIf(If block)
return this;
}
+ public Builder addIf(Conditional conditional, Mutation... mutations)
+ {
+ return addIf(conditional, Arrays.asList(mutations));
+ }
+
+ public Builder addIf(Conditional conditional, List<Mutation> mutations)
Review Comment:
Is this supposed to be included?
--
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
Re: [PR] CASSANDRA-20020: Accord should block currently unsafe operations [cassandra]
Posted by "aweisberg (via GitHub)" <gi...@apache.org>.
aweisberg commented on code in PR #3631:
URL: https://github.com/apache/cassandra/pull/3631#discussion_r1813395594
##########
src/java/org/apache/cassandra/cql3/statements/TransactionStatement.java:
##########
@@ -98,9 +98,13 @@ public class TransactionStatement implements CQLStatement.CompositeCQLStatement,
public static final String INCOMPLETE_PRIMARY_KEY_SELECT_MESSAGE = "SELECT must specify either all primary key elements or all partition key elements and LIMIT 1. In both cases partition key elements must be always specified with equality operators; %s %s";
public static final String NO_CONDITIONS_IN_UPDATES_MESSAGE = "Updates within transactions may not specify their own conditions; %s statement %s";
public static final String NO_TIMESTAMPS_IN_UPDATES_MESSAGE = "Updates within transactions may not specify custom timestamps; %s statement %s";
+ public static final String NO_TTLS_IN_UPDATES_MESSAGE = "Updates within transactions may not specify custom ttls; %s statement %s";
public static final String TRANSACTIONS_DISABLED_ON_TABLE_MESSAGE = "Accord transactions are disabled on table (See transactional_mode in table options); %s statement %s";
public static final String TRANSACTIONS_DISABLED_ON_TABLE_BEING_DROPPED_MESSAGE = "Accord transactions are disabled on table (table is being dropped); %s statement %s";
public static final String NO_COUNTERS_IN_TXNS_MESSAGE = "Counter columns cannot be accessed within a transaction; %s statement %s";
+ public static final String NO_AGGREGATION_IN_TXNS_MESSAGE = "No aggregation functions allowed within a transaction; %s statement %s";
+ public static final String NO_ORDER_BY_IN_TXNS_MESSAGE = "No ORDER BY clause allowed within a transaction; %s statement %s";
Review Comment:
Are all instances of `ORDER BY` actually a problem? I think you could order by on clustering columns `LIMIT 1` and it should be correct?
--
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
Re: [PR] CASSANDRA-20020: Accord should block currently unsafe operations [cassandra]
Posted by "dcapwell (via GitHub)" <gi...@apache.org>.
dcapwell merged PR #3631:
URL: https://github.com/apache/cassandra/pull/3631
--
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