Skip to content

Commit 75a8c45

Browse files
Regen Async
1 parent d5489ea commit 75a8c45

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

src/NHibernate/Async/Multi/QueryBatchItemBase.cs

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ public async Task<int> ProcessResultsSetAsync(DbDataReader reader, CancellationT
3434

3535
var dialect = Session.Factory.Dialect;
3636
var hydratedObjects = new List<object>[_queryInfos.Count];
37+
var isDebugLog = Log.IsDebugEnabled();
3738

3839
using (Session.SwitchCacheMode(_cacheMode))
3940
{
@@ -76,8 +77,15 @@ public async Task<int> ProcessResultsSetAsync(DbDataReader reader, CancellationT
7677
var optionalObjectKey = Loader.Loader.GetOptionalObjectKey(queryParameters, Session);
7778
var tmpResults = new List<object>();
7879

79-
for (var count = 0; count < maxRows && await (reader.ReadAsync(cancellationToken)).ConfigureAwait(false); count++)
80+
if (isDebugLog)
81+
Log.Debug("processing result set");
82+
83+
int count;
84+
for (count = 0; count < maxRows && await (reader.ReadAsync(cancellationToken)).ConfigureAwait(false); count++)
8085
{
86+
if (isDebugLog)
87+
Log.Debug("result set row: {0}", count);
88+
8189
rowCount++;
8290

8391
var o =
@@ -101,6 +109,9 @@ public async Task<int> ProcessResultsSetAsync(DbDataReader reader, CancellationT
101109
tmpResults.Add(o);
102110
}
103111

112+
if (isDebugLog)
113+
Log.Debug("done processing result set ({0} rows)", count);
114+
104115
queryInfo.Result = tmpResults;
105116
if (queryInfo.CanPutToCache)
106117
queryInfo.ResultToCache = new List<object>(tmpResults);

0 commit comments

Comments
 (0)