/** Setup a new RepairAlgo but don't take any action to take responsibility. */ public SpPromoteAlgo( List<Long> survivors, InitiatorMailbox mailbox, String whoami, int partitionId) { m_mailbox = mailbox; m_survivors = survivors; m_whoami = whoami; m_maxSeenTxnId = TxnEgo.makeZero(partitionId).getTxnId(); }
/** Create a new execution site and the corresponding EE */ public Site( SiteTaskerQueue scheduler, long siteId, BackendTarget backend, CatalogContext context, String serializedCatalog, long txnId, int partitionId, int numPartitions, VoltDB.START_ACTION startAction, int snapshotPriority, InitiatorMailbox initiatorMailbox, StatsAgent agent, MemoryStats memStats) { m_siteId = siteId; m_context = context; m_partitionId = partitionId; m_numberOfPartitions = numPartitions; m_scheduler = scheduler; m_backend = backend; m_startAction = startAction; m_rejoinState = VoltDB.createForRejoin(startAction) ? kStateRejoining : kStateRunning; m_snapshotPriority = snapshotPriority; // need this later when running in the final thread. m_startupConfig = new StartupConfig(serializedCatalog, context.m_timestamp); m_lastCommittedTxnId = TxnEgo.makeZero(partitionId).getTxnId(); m_lastCommittedSpHandle = TxnEgo.makeZero(partitionId).getTxnId(); m_currentTxnId = Long.MIN_VALUE; m_initiatorMailbox = initiatorMailbox; if (agent != null) { m_tableStats = new TableStats(m_siteId); agent.registerStatsSource(SysProcSelector.TABLE, m_siteId, m_tableStats); m_indexStats = new IndexStats(m_siteId); agent.registerStatsSource(SysProcSelector.INDEX, m_siteId, m_indexStats); m_memStats = memStats; } else { // MPI doesn't need to track these stats m_tableStats = null; m_indexStats = null; m_memStats = null; } }