@@ -74,8 +74,8 @@ public async Task<WriteResult> WriteAsync(Message<TValue> message)
7474 curLimitBufferSize == _config . BufferMaxSize && data . Length > curLimitBufferSize
7575 || curLimitBufferSize >= data . Length )
7676 {
77- if ( Interlocked . CompareExchange ( ref _limitBufferMaxSize , curLimitBufferSize ,
78- curLimitBufferSize - data . Length ) == curLimitBufferSize )
77+ if ( Interlocked . CompareExchange ( ref _limitBufferMaxSize ,
78+ curLimitBufferSize - data . Length , curLimitBufferSize ) == curLimitBufferSize )
7979 {
8080 _toSendBuffer . Enqueue ( new MessageSending ( messageData , completeTask ) ) ;
8181
@@ -92,7 +92,7 @@ public async Task<WriteResult> WriteAsync(Message<TValue> message)
9292 "Buffer overflow: the data size [{DataLength}] exceeds the current buffer limit ({CurLimitBufferSize}) [BufferMaxSize = {BufferMaxSize}]" ,
9393 data . Length , curLimitBufferSize , _config . BufferMaxSize ) ;
9494
95- throw new YdbWriterException ( "Buffer overflow" ) ;
95+ throw new WriterException ( "Buffer overflow" ) ;
9696 }
9797
9898 try
@@ -199,7 +199,7 @@ private async Task Initialize()
199199 _logger . LogError ( e , "Unable to connect the session" ) ;
200200
201201 _session = new NotStartedWriterSession (
202- new YdbWriterException ( "Transport error on creating write session" , e ) ) ;
202+ new WriterException ( "Transport error on creating write session" , e ) ) ;
203203 }
204204 }
205205
@@ -227,19 +227,19 @@ internal interface IWriteSession : IDisposable
227227
228228internal class NotStartedWriterSession : IWriteSession
229229{
230- private readonly YdbWriterException _reasonException ;
230+ private readonly WriterException _reasonException ;
231231
232232 public NotStartedWriterSession ( string reasonExceptionMessage )
233233 {
234- _reasonException = new YdbWriterException ( reasonExceptionMessage ) ;
234+ _reasonException = new WriterException ( reasonExceptionMessage ) ;
235235 }
236236
237237 public NotStartedWriterSession ( string reasonExceptionMessage , Status status )
238238 {
239- _reasonException = new YdbWriterException ( reasonExceptionMessage , status ) ;
239+ _reasonException = new WriterException ( reasonExceptionMessage , status ) ;
240240 }
241241
242- public NotStartedWriterSession ( YdbWriterException reasonException )
242+ public NotStartedWriterSession ( WriterException reasonException )
243243 {
244244 _reasonException = reasonException ;
245245 }
@@ -365,7 +365,7 @@ Completing task on exception...
365365Client SeqNo: {SeqNo}, WriteAck: {WriteAck}" ,
366366 messageFromClient . MessageData . SeqNo , ack ) ;
367367
368- messageFromClient . TaskCompletionSource . SetException ( new YdbWriterException (
368+ messageFromClient . TaskCompletionSource . SetException ( new WriterException (
369369 $ "Client SeqNo[{ messageFromClient . MessageData . SeqNo } ] is less then server's WriteAck[{ ack } ]") ) ;
370370 }
371371 else
0 commit comments