Skip to content

Commit 3321aad

Browse files
committed
Small renaming
1 parent cf1cc3a commit 3321aad

File tree

3 files changed

+10
-10
lines changed

3 files changed

+10
-10
lines changed

src/MongoDB.Driver/Core/Operations/ClientBulkWriteOperation.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ protected override IEnumerable<BatchableCommandMessageSection> CreateCommandPayl
110110
bulkWriteResults.TopLevelException = commandException;
111111
serverResponse = commandException.Result;
112112
}
113-
catch (Exception exception) when (!context.ErrorDuringLastAcquisition)
113+
catch (Exception exception) when (!context.ErrorDuringLastChannelAcquisition)
114114
{
115115
bulkWriteResults.TopLevelException = exception;
116116
}
@@ -168,7 +168,7 @@ protected override IEnumerable<BatchableCommandMessageSection> CreateCommandPayl
168168
bulkWriteResults.TopLevelException = commandException;
169169
serverResponse = commandException.Result;
170170
}
171-
catch (Exception exception) when (!context.ErrorDuringLastAcquisition)
171+
catch (Exception exception) when (!context.ErrorDuringLastChannelAcquisition)
172172
{
173173
bulkWriteResults.TopLevelException = exception;
174174
}

src/MongoDB.Driver/Core/Operations/RetryableWriteContext.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ public static RetryableWriteContext Create(IWriteBinding binding, bool retryRequ
4040
private IChannelSourceHandle _channelSource;
4141
private bool _disposed;
4242
private bool _retryRequested;
43-
private bool _errorDuringLastAcquisition;
43+
private bool _errorDuringLastChannelAcquisition;
4444
private ServerDescription _lastAcquiredServer;
4545

4646
public RetryableWriteContext(IWriteBinding binding, bool retryRequested)
@@ -53,7 +53,7 @@ public RetryableWriteContext(IWriteBinding binding, bool retryRequested)
5353
public IChannelHandle Channel => _channel;
5454
public IChannelSourceHandle ChannelSource => _channelSource;
5555
public bool RetryRequested => _retryRequested;
56-
public bool ErrorDuringLastAcquisition => _errorDuringLastAcquisition;
56+
public bool ErrorDuringLastChannelAcquisition => _errorDuringLastChannelAcquisition;
5757
public ServerDescription LastAcquiredServer => _lastAcquiredServer;
5858

5959
public void Dispose()
@@ -71,7 +71,7 @@ public void AcquireOrReplaceChannel(OperationContext operationContext, IReadOnly
7171
{
7272
try
7373
{
74-
_errorDuringLastAcquisition = false;
74+
_errorDuringLastChannelAcquisition = false;
7575
_lastAcquiredServer = null;
7676
operationContext.ThrowIfTimedOutOrCanceled();
7777
var writeChannelSource = Binding.GetWriteChannelSource(operationContext, deprioritizedServers);
@@ -83,7 +83,7 @@ public void AcquireOrReplaceChannel(OperationContext operationContext, IReadOnly
8383
}
8484
catch
8585
{
86-
_errorDuringLastAcquisition = true;
86+
_errorDuringLastChannelAcquisition = true;
8787
_channelSource?.Dispose();
8888
_channel?.Dispose();
8989
throw;
@@ -94,7 +94,7 @@ public async Task AcquireOrReplaceChannelAsync(OperationContext operationContext
9494
{
9595
try
9696
{
97-
_errorDuringLastAcquisition = false;
97+
_errorDuringLastChannelAcquisition = false;
9898
_lastAcquiredServer = null;
9999
operationContext.ThrowIfTimedOutOrCanceled();
100100
var writeChannelSource = await Binding
@@ -107,7 +107,7 @@ public async Task AcquireOrReplaceChannelAsync(OperationContext operationContext
107107
}
108108
catch
109109
{
110-
_errorDuringLastAcquisition = true;
110+
_errorDuringLastChannelAcquisition = true;
111111
_channelSource?.Dispose();
112112
_channel?.Dispose();
113113
throw;

src/MongoDB.Driver/Core/Operations/RetryableWriteOperationExecutor.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,9 +115,9 @@ private static bool ShouldRetryOperation(OperationContext operationContext, Writ
115115
if (server is null)
116116
return false;
117117

118-
if (context.ErrorDuringLastAcquisition)
118+
if (context.ErrorDuringLastChannelAcquisition)
119119
{
120-
// According to the spec error during handshake should be handled according to RetryableReads logic
120+
// According to the spec, errors during handshake should be handled according to RetryableReads logic
121121
exception = exception is MongoAuthenticationException mongoAuthenticationException ? mongoAuthenticationException.InnerException : exception;
122122

123123
if (!DoesContextAllowRetries(context, server))

0 commit comments

Comments
 (0)