public Transaction startLong ( ) { txMetricsCollector . rate ( "start.long" ) ; Stopwatch timer = new Stopwatch ( ) . start ( ) ; long expiration = getTxExpiration ( defaultLongTimeout ) ; Transaction tx = startTx ( expiration , TransactionType . LONG ) ; txMetricsCollector . histogram ( "start.long.latency" , ( int ) timer . elapsedMillis ( ) ) ; return tx ; }
Start a long transaction . Long transactions and do not participate in conflict detection . Also aborting a long transaction moves it to the invalid list because we assume that its writes cannot be rolled back .