@Override protected BatchTransactionApplierFacade applier( TransactionApplicationMode mode, IndexActivator indexActivator ) { BatchTransactionApplierFacade recordEngineApplier = super.applier( mode, indexActivator ); return transactionApplierTransformer.apply( recordEngineApplier ); } }
@Override public void apply( CommandsToApply batch, TransactionApplicationMode mode ) throws Exception { // Have these command appliers as separate try-with-resource to have better control over // point between closing this and the locks above try ( IndexActivator indexActivator = new IndexActivator( indexingService ); LockGroup locks = new LockGroup(); BatchTransactionApplier batchApplier = applier( mode, indexActivator ) ) { while ( batch != null ) { try ( TransactionApplier txApplier = batchApplier.startTx( batch, locks ) ) { batch.accept( txApplier ); } batch = batch.next(); } } catch ( Throwable cause ) { TransactionApplyKernelException kernelException = new TransactionApplyKernelException( cause, "Failed to apply transaction: %s", batch ); databaseHealth.panic( kernelException ); throw kernelException; } }
@Override public void apply( CommandsToApply batch, TransactionApplicationMode mode ) throws Exception { // Have these command appliers as separate try-with-resource to have better control over // point between closing this and the locks above try ( IndexActivator indexActivator = new IndexActivator( indexingService ); LockGroup locks = new LockGroup(); BatchTransactionApplier batchApplier = applier( mode, indexActivator ) ) { while ( batch != null ) { try ( TransactionApplier txApplier = batchApplier.startTx( batch, locks ) ) { batch.accept( txApplier ); } batch = batch.next(); } } catch ( Throwable cause ) { TransactionApplyKernelException kernelException = new TransactionApplyKernelException( cause, "Failed to apply transaction: %s", batch ); databaseHealth.panic( kernelException ); throw kernelException; } }