Patent attributes
An optimization of the two-phase commit protocol employed in distributed systems. Each cohort component of the distributed system augments messages that are accessible to the coordinator component with state information indicating whether the cohort is read-only with regard to a transaction that the coordinator is coordinating. The coordinator retains the most recent state information. The coordinator reads the retained state information for the cohorts and when the transaction terminates, the coordinator reads the retained state information. Where the cohort's state is read-only, the coordinator simply sends an abort message instead of performing the full two-phase commit protocol with regard to the read-only cohort. In the trees of distributed system components that are defined by transactions, any cohort which has children in the tree is a local coordinator for its children. The general technique of cohorts augmenting messages accessible to a coordinator with state information that is relevant to an action to be performed by the coordinator and the coordinator acting in accordance with state retained from the messages has other uses as well.