Yes. it look as a missing line. On Wed, Aug 4, 2010 at 12:57 PM, James Gregory <[email protected]>wrote:
> Hey guys, > > We're still investigating timeout issues and have noticed something a > bit strange in the NH source. > > Looking at SqlClientBatchingBatcher.cs, it doesn't appear to set the > command timeout on any batches other than the initial one. Can anyone > confirm whether this is the case or whether we've missed something? > > > https://nhibernate.svn.sourceforge.net/svnroot/nhibernate/trunk/nhibernate/src/NHibernate/AdoNet/SqlClientBatchingBatcher.cs > > The general flow of the SqlClientBatchingBatcher (as far as I can > tell) is as follows: > > 1. In ctor: Create "currentBatch" command set > 2. In ctor: Call SetCommandTimeout which sets the timeout of the > "currentBatch" > 3. AddToBatch called multiple times, appending commands to the > "currentBatch" until the batch size is exceeded, when > ExecuteBatchWithTiming is called > 4. DoExecuteBatch is called, executing the queries > 5. "currentBatch" is reassigned to a new command set > > If you follow along in code, you'll notice that the timeout is *only* > set on the currentBatch in the constructor, and after calling > DoExecuteBatch the currentBatch is reassigned *without* setting the > timeout again. > > This looks like a bug to me, what do you guys think? > > James -- Fabio Maulo
