aweisberg commented on code in PR #3694:
URL: https://github.com/apache/cassandra/pull/3694#discussion_r1848833291
##########
src/java/org/apache/cassandra/service/StorageProxy.java:
##########
@@ -2181,18 +2183,18 @@ private static ConsistencyLevel
consistencyLevelForAccordRead(ClusterMetadata cm
return null;
}
-
- public static AsyncTxnResult readWithAccord(ClusterMetadata cm,
PartitionRangeReadCommand command, ConsistencyLevel consistencyLevel,
Dispatcher.RequestTime requestTime)
- {
+ public static AsyncTxnResult readWithAccord(ClusterMetadata cm,
PartitionRangeReadCommand command, List<AbstractBounds<PartitionPosition>>
ranges, ConsistencyLevel consistencyLevel, Dispatcher.RequestTime requestTime)
{
if (consistencyLevel != null &&
!IAccordService.SUPPORTED_READ_CONSISTENCY_LEVELS.contains(consistencyLevel))
throw new InvalidRequestException(consistencyLevel + " is not
supported by Accord");
TableMetadata tableMetadata = getTableMetadata(cm,
command.metadata().id);
TableParams tableParams = tableMetadata.params;
Range<Token> readRange = new
Range<>(command.dataRange().startKey().getToken(),
command.dataRange().stopKey().getToken());
consistencyLevel =
tableParams.transactionalMode.readCLForStrategy(tableParams.transactionalMigrationFrom,
consistencyLevel, cm, tableMetadata.id, readRange);
- TxnRead read = new TxnRangeRead(command, consistencyLevel);
- Txn.Kind kind = EphemeralRead;
+ TxnRead read = new TxnRangeRead(command, ranges, consistencyLevel);
+ Txn.Kind kind = Read;
+ if (tableParams.transactionalMode == TransactionalMode.full &&
getAccordEphemeralReadEnabledEnabled() &&
tableParams.transactionalMigrationFrom == none)
Review Comment:
Sure I'll factor it out into a common 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: [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]