$jobStartTime = microtime( true );
try {
$fnameTrxOwner = get_class( $job ) . '::run'; // give run() outer scope
- $lbFactory->beginMasterChanges( $fnameTrxOwner );
+ if ( !$job->hasExecutionFlag( $job::JOB_NO_EXPLICIT_TRX_ROUND ) ) {
+ $lbFactory->beginMasterChanges( $fnameTrxOwner );
+ }
$status = $job->run();
$error = $job->getLastError();
$this->commitMasterChanges( $lbFactory, $job, $fnameTrxOwner );