@Override public TransactionProperties newTransactionProperties() { return new TransactionProperties(propertiesAccessor); }
public CheckpointProperties(TransactionProperties txnProperties, String nodeId) { // Currently we use the log files directory for checkpoints checkpointDirPath = txnProperties.getLogDirectory(nodeId); lsnThreshold = txnProperties.getCheckpointLSNThreshold(); pollFrequency = txnProperties.getCheckpointPollFrequency(); historyToKeep = txnProperties.getCheckpointHistory(); datasetCheckpointInterval = txnProperties.getDatasetCheckpointInterval(); }
public LogManagerProperties(TransactionProperties txnProperties, String nodeId) { this.logPageSize = txnProperties.getLogBufferPageSize(); this.numLogPages = txnProperties.getLogBufferNumPages(); long logPartitionSize = txnProperties.getLogPartitionSize(); this.logDir = txnProperties.getLogDirectory(nodeId); this.logFilePrefix = DEFAULT_LOG_FILE_PREFIX; int logBufferSize = logPageSize * numLogPages; //make sure that the log partition size is the multiple of log buffer size. this.logPartitionSize = (logPartitionSize / logBufferSize) * logBufferSize; }
public TransactionSubsystem(INcApplicationContext appCtx, IRecoveryManagerFactory recoveryManagerFactory) { this.appCtx = appCtx; this.id = appCtx.getServiceContext().getNodeId(); this.txnProperties = appCtx.getTransactionProperties(); this.transactionManager = new TransactionManager(this); this.lockManager = new ConcurrentLockManager(txnProperties.getLockManagerShrinkTimer()); final ReplicationProperties repProperties = appCtx.getReplicationProperties(); final boolean replicationEnabled = repProperties.isReplicationEnabled(); final CheckpointProperties checkpointProperties = new CheckpointProperties(txnProperties, id); if (LOGGER.isInfoEnabled()) { LOGGER.log(Level.INFO, "Checkpoint Properties: " + checkpointProperties); } checkpointManager = CheckpointManagerFactory.create(this, checkpointProperties); final Checkpoint latestCheckpoint = checkpointManager.getLatest(); if (latestCheckpoint != null) { transactionManager.ensureMaxTxnId(latestCheckpoint.getMaxTxnId()); } this.logManager = replicationEnabled ? new LogManagerWithReplication(this) : new LogManager(this); this.recoveryManager = recoveryManagerFactory.createRecoveryManager(appCtx.getServiceContext(), this); if (txnProperties.isCommitProfilerEnabled()) { ecp = new EntityCommitProfiler(this, this.txnProperties.getCommitProfilerReportInterval()); ((ExecutorService) appCtx.getThreadExecutor()).submit(ecp); } }
LockMode.ANY, txnCtx); txnCtx.notifyEntityCommitted(logRecord.getResourcePartition()); if (txnSubsystem.getTransactionProperties().isCommitProfilerEnabled()) { txnSubsystem.incrementEntityCommitCount();
public RecoveryManager(INCServiceContext serviceCtx, ITransactionSubsystem txnSubsystem) { this.serviceCtx = serviceCtx; this.txnSubsystem = txnSubsystem; this.appCtx = txnSubsystem.getApplicationContext(); logMgr = (LogManager) txnSubsystem.getLogManager(); ReplicationProperties repProperties = appCtx.getReplicationProperties(); replicationEnabled = repProperties.isReplicationEnabled(); localResourceRepository = (PersistentLocalResourceRepository) appCtx.getLocalResourceRepository(); cachedEntityCommitsPerJobSize = txnSubsystem.getTransactionProperties().getJobRecoveryMemorySize(); checkpointManager = txnSubsystem.getCheckpointManager(); }
metadataProperties = new MetadataProperties(propertiesAccessor); storageProperties = new StorageProperties(propertiesAccessor); txnProperties = new TransactionProperties(propertiesAccessor); activeProperties = new ActiveProperties(propertiesAccessor); extensionProperties = new ExtensionProperties(propertiesAccessor);