Use BatchedModifications message in place of ReadyTransaction message
For the optimized write transactions (currently disabled), we used the
last BatchedModifications message with the ready flag set to elide
sending the ReadyTransaction message. We can do this in general for both
read-write and write-only.
In ShardWriteTransaction, if the BatchedModifications indicates ready,
it simply calls readyTransaction to send ForwardedReadyTransaction
message to the shard, same as with the ReadyTransacton message.
Instead of returning a BatchedModificationsReply with the cohort path,
I kept the ReadyTransactionReply so the Shard code mostly remains the
same - otherwise we'd have to introduce an equivalent
batched ForwardedReadyTransaction message.
I also made ReadyTransactionReply Externalizable so we don't have to
deal with sending it serialized or not (except for backwards
compatibility - had to keep the protobuff class).
TransactionContextImpl#readyTransaction is now the same as
WriteTransactionContextImpl#readyTransaction so
WriteTransactionContextImpl is no longer needed and was removed.
Change-Id: I5175c77ca08a1877af9593a28e7c4cb46f03287a
Signed-off-by: Tom Pantelis <tpanteli@brocade.com>
20 files changed: