private GridCacheVersion minVersion(Iterable<IgniteTxEntry> entries,GridCacheVersion min,IgniteInternalTx tx){
  for (  IgniteTxEntry txEntry : entries) {
    GridCacheEntryEx cached=txEntry.cached();
    assert txEntry.isRead() || !cached.obsolete(tx.xidVersion()) : "Invalid obsolete version for transaction [entry=" + cached + ", tx="+ tx+ ']';
    for (    GridCacheMvccCandidate cand : cached.remoteMvccSnapshot())     if (min == null || cand.version().isLess(min))     min=cand.version();
  }
  return min;
}

private GridCacheVersion minVersion ( Iterable < IgniteTxEntry > entries , GridCacheVersion min , IgniteInternalTx tx ) { for ( IgniteTxEntry txEntry : entries ) { GridCacheEntryEx cached = txEntry . cached ( ) ; assert txEntry . isRead ( ) || ! cached . obsolete ( tx . xidVersion ( ) ) : "Invalid obsolete version for transaction [entry=" + cached + ", tx=" + tx + ']' ; for ( GridCacheMvccCandidate cand : cached . remoteMvccSnapshot ( ) ) if ( min == null || cand . version ( ) . isLess ( min ) ) min = cand . version ( ) ; } return min ; }
go through all candidates for entries involved in transaction and find their min version . we know that these candidates will commit after this transaction , and therefore we can grab the min version so we can send all committed and rolled back versions from min to current to remote nodes for re - ordering .
