[
https://issues.apache.org/jira/browse/IGNITE-1553?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16372694#comment-16372694
]
Alexey Kuznetsov commented on IGNITE-1553:
------------------------------------------
[~agoncharuk]
I have implemented this optimisation, and i have a question.
This optimisation requires database to support prepare and commit phases.
Suppose, we have some database `A`, we have no way to figure out whether it
supports prepare and finish or not.
I propose to add some method
{code:java}
boolean supports2PhaseCommit(){
return true;// or false;
}
{code}
to CacheStore interface. It will give us opportunity to optimize transaction
prepare step given any cache store.
What do you think about it ?
> Optimize transaction prepare step when store is enabled
> -------------------------------------------------------
>
> Key: IGNITE-1553
> URL: https://issues.apache.org/jira/browse/IGNITE-1553
> Project: Ignite
> Issue Type: Improvement
> Components: cache
> Affects Versions: ignite-1.4
> Reporter: Alexey Goncharuk
> Assignee: Alexey Kuznetsov
> Priority: Major
> Labels: important
>
> Currently entries are enlisted in a database transaction after grid
> transaction is in PREPARED state. We can do this in parallel in the following
> fashion (pseudo-code):
> {code}
> fut = tx.prepareAsync();
> db.write(tx.writes());
> fut.get();
> try {
> db.commit();
>
> tx.commit();
> }
> catch (Exception e) {
> tx.rollback();
> }
> {code}
> If this approach is applied, we should be able to reduce latency for
> transactions when write-through is enabled.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)