dcapwell commented on code in PR #37:
URL: https://github.com/apache/cassandra-accord/pull/37#discussion_r1326536263
##########
accord-core/src/main/java/accord/api/Write.java:
##########
@@ -30,5 +31,5 @@
*/
public interface Write
{
- AsyncChain<Void> apply(Seekable key, SafeCommandStore safeStore, Timestamp
executeAt, DataStore store);
+ AsyncChain<Void> apply(Seekable key, SafeCommandStore safeStore, Timestamp
executeAt, DataStore store, Command.Executed command);
Review Comment:
I kinda don't like exposing `Command` in the API and kinda prefer `TxnId`...
you do the following in C*
```
// Pull updates for this key that did not require completion form the
transaction itself and apply them:
TxnUpdate txnUpdate = (TxnUpdate) command.partialTxn().update();
assert txnUpdate != null : "PartialTxn should contain an update
if we're applying a write!";
List<Update> updates =
txnUpdate.completeUpdatesForKey((RoutableKey) key);
updates.forEach(update -> results.add(update.write(timestamp,
nowInSeconds)));
```
so you will need it, but I just kinda don't like it...
--
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]