@@ -797,6 +797,13 @@ public override IEnumerator<YdbDataRecord> GetEnumerator()
797797 /// <remarks>
798798 /// This method closes the reader and releases any resources associated with it.
799799 /// If the reader is closed during a transaction, the transaction will be marked as failed.
800+ ///
801+ /// <para>
802+ /// Important: If the stream is not fully read to the end, the session associated with this stream
803+ /// and the corresponding <see cref="YdbConnection"/> will be marked as invalid to avoid
804+ /// <see cref="StatusCode.SessionBusy"/> errors. Because the session may be returned to the pool
805+ /// and immediately reused for a new request while the previous one is still not completed.
806+ /// </para>
800807 /// </remarks>
801808 public override async Task CloseAsync ( )
802809 {
@@ -831,6 +838,13 @@ public override async Task CloseAsync()
831838 /// <remarks>
832839 /// This method closes the reader and releases any resources associated with it.
833840 /// If the reader is closed during a transaction, the transaction will be marked as failed.
841+ ///
842+ /// <para>
843+ /// Important: If the stream is not fully read to the end, the session associated with this stream
844+ /// and the corresponding <see cref="YdbConnection"/> will be marked as invalid to avoid
845+ /// <see cref="StatusCode.SessionBusy"/> errors. Because the session may be returned to the pool
846+ /// and immediately reused for a new request while the previous one is still not completed.
847+ /// </para>
834848 /// </remarks>
835849 public override void Close ( ) => CloseAsync ( ) . GetAwaiter ( ) . GetResult ( ) ;
836850
@@ -922,6 +936,13 @@ private void OnFailReadStream()
922936 /// <returns>A ValueTask representing the asynchronous disposal operation.</returns>
923937 /// <remarks>
924938 /// This method closes the reader and releases any resources associated with it.
939+ ///
940+ /// <para>
941+ /// Important: If the stream is not fully read to the end, the session associated with this stream
942+ /// and the corresponding <see cref="YdbConnection"/> will be marked as invalid to avoid
943+ /// <see cref="StatusCode.SessionBusy"/> errors. Because the session may be returned to the pool
944+ /// and immediately reused for a new request while the previous one is still not completed.
945+ /// </para>
925946 /// </remarks>
926947 public override async ValueTask DisposeAsync ( ) => await CloseAsync ( ) ;
927948
0 commit comments