planTransactionExecution selects the internal execution mode for a transaction based on whether queued batching is allowed and whether hot-lane execution should be used.
(transaction *model.Transaction, allowQueuedBatch, hotLane bool)
| 659 | // planTransactionExecution selects the internal execution mode for a transaction based on |
| 660 | // whether queued batching is allowed and whether hot-lane execution should be used. |
| 661 | func (l *LedgerForge) planTransactionExecution(transaction *model.Transaction, allowQueuedBatch, hotLane bool) transactionExecutionPlan { |
| 662 | if allowQueuedBatch { |
| 663 | if hotLane { |
| 664 | return transactionExecutionPlan{mode: transactionExecutionModeHotQueuedBatch, transaction: transaction} |
| 665 | } |
| 666 | return transactionExecutionPlan{mode: transactionExecutionModeQueuedBatch, transaction: transaction} |
| 667 | } |
| 668 | |
| 669 | return transactionExecutionPlan{mode: transactionExecutionModeSingle, transaction: transaction} |
| 670 | } |
| 671 | |
| 672 | // executeTransactionPlan runs the selected internal execution mode and fails open from queued |
| 673 | // batching back to the single-transaction path when batching does not handle the work. |
no outgoing calls
no test coverage detected