public InitiateResponseMessage dedupe ( long inUniqueId , TransactionInfoBaseMessage in ) { if ( in instanceof Iv2InitiateTaskMessage ) { final Iv2InitiateTaskMessage init = ( Iv2InitiateTaskMessage ) in ; final StoredProcedureInvocation invocation = init . getStoredProcedureInvocation ( ) ; final String procName = invocation . getProcName ( ) ; /* * Ning - @LoadSinglepartTable and @LoadMultipartTable always have the same txnId * which is the txnId of the snapshot. */ if ( ! ( procName . equalsIgnoreCase ( "@LoadSinglepartitionTable" ) || procName . equalsIgnoreCase ( "@LoadMultipartitionTable" ) ) && inUniqueId <= m_lastSeenUniqueId ) { // already sequenced final InitiateResponseMessage resp = new InitiateResponseMessage ( init ) ; resp . setResults ( new ClientResponseImpl ( ClientResponseImpl . UNEXPECTED_FAILURE , new VoltTable [ 0 ] , ClientResponseImpl . IGNORED_TRANSACTION ) ) ; return resp ; } } return null ; }
Dedupe initiate task messages . Check if the initiate task message is seen before .