Package org.voltdb.messaging

Examples of org.voltdb.messaging.CompleteTransactionMessage


    }

    @Override
    void completeInitiateTask(SiteProcedureConnection siteConnection)
    {
        CompleteTransactionMessage complete = new CompleteTransactionMessage(
                m_initiator.getHSId(), // who is the "initiator" now??
                m_initiator.getHSId(),
                m_txnState.txnId,
                m_txnState.isReadOnly(),
                m_txnState.getHash(),
                m_txnState.needsRollback(),
                false,  // really don't want to have ack the ack.
                false,
                m_msg.isForReplay());

        complete.setTruncationHandle(m_msg.getTruncationHandle());
        complete.setOriginalTxnId(m_msg.getOriginalTxnId());
        m_initiator.send(com.google_voltpatches.common.primitives.Longs.toArray(m_initiatorHSIds), complete);
        m_txnState.setDone();
        m_queue.flush(getTxnId());
    }
View Full Code Here


            // the initiatorHSId is the ClientInterface mailbox. Yeah. I know.
            m_mailbox.send(message.getInitiatorHSId(), message);
            // We actually completed this MP transaction.  Create a fake CompleteTransactionMessage
            // to send to our local repair log so that the fate of this transaction is never forgotten
            // even if all the masters somehow die before forwarding Complete on to their replicas.
            CompleteTransactionMessage ctm = new CompleteTransactionMessage(m_mailbox.getHSId(),
                    message.m_sourceHSId, message.getTxnId(), message.isReadOnly(), 0,
                    !message.shouldCommit(), false, false, false);
            ctm.setTruncationHandle(m_repairLogTruncationHandle);
            // dump it in the repair log
            // hacky castage
            ((MpInitiatorMailbox)m_mailbox).deliverToRepairLog(ctm);
        }
    }
View Full Code Here

            boolean restart = !ftm.isReadOnly();
            if (restart) {
                assert(ftm.getInitiateTask() != null);
                m_interruptedTxns.add(ftm.getInitiateTask());
            }
            CompleteTransactionMessage rollback =
                new CompleteTransactionMessage(
                        ftm.getInitiatorHSId(),
                        ftm.getCoordinatorHSId(),
                        ftm.getTxnId(),
                        ftm.isReadOnly(),
                        0,
                        true,   // Force rollback as our repair operation.
                        false,  // no acks in iv2.
                        restart,   // Indicate rollback for repair as appropriate
                        ftm.isForReplay());
            rollback.setOriginalTxnId(ftm.getOriginalTxnId());
            return rollback;
        }
    }
View Full Code Here

            }
        }
        else if (msg instanceof CompleteTransactionMessage) {
            // a CompleteTransactionMessage which indicates restart is not the end of the
            // transaction.  We don't want to log it in the repair log.
            CompleteTransactionMessage ctm = (CompleteTransactionMessage)msg;
            if (!ctm.isReadOnly() && !ctm.isRestart()) {
                truncate(ctm.getTruncationHandle(), IS_MP);
                m_logMP.add(new Item(IS_MP, ctm, ctm.getSpHandle(), ctm.getTxnId()));
                //Restore will send a complete transaction message with a lower mp transaction id because
                //the restore transaction precedes the loading of the right mp transaction id from the snapshot
                //Hence Math.max
                m_lastMpHandle = Math.max(m_lastMpHandle, ctm.getTxnId());
                m_lastSpHandle = ctm.getSpHandle();
            }
        }
        else if (msg instanceof DumpMessage) {
            String who = CoreUtils.hsIdToString(m_HSId);
            tmLog.warn("Repair log dump for site: " + who + ", isLeader: " + m_isLeader);
View Full Code Here

            }
            else if (tibm instanceof CompleteTransactionMessage) {
                // Needs improvement: completes for sysprocs aren't filterable as sysprocs.
                // Only complete transactions that are open...
                if (global_replay_mpTxn != null) {
                    CompleteTransactionMessage m = (CompleteTransactionMessage)tibm;
                    CompleteTransactionTask t = new CompleteTransactionTask(global_replay_mpTxn,
                            null, m, m_drGateway);
                    if (!m.isRestart()) {
                        global_replay_mpTxn = null;
                    }
                    if (!filter(tibm)) {
                        t.runFromTaskLog(this);
                    }
View Full Code Here

TOP

Related Classes of org.voltdb.messaging.CompleteTransactionMessage

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.