Skip to content

Commit a66c65c

Browse files
committed
Code changes to merge master and hook exception stack optimization through client options.
1 parent cd88058 commit a66c65c

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

Microsoft.Azure.Cosmos/src/Routing/AsyncCacheNonBlocking.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,6 @@ internal sealed class AsyncCacheNonBlocking<TKey, TValue> : IDisposable
2828
private readonly IEqualityComparer<TKey> keyEqualityComparer;
2929
private bool isDisposed;
3030

31-
private static readonly bool isStackTraceOptimizationEnabled = false;
32-
3331
public AsyncCacheNonBlocking(
3432
Func<Exception, bool> removeFromCacheOnBackgroundRefreshException = null,
3533
IEqualityComparer<TKey> keyEqualityComparer = null,
@@ -123,7 +121,7 @@ public async Task<TValue> GetAsync(
123121
e);
124122
}
125123

126-
if (isStackTraceOptimizationEnabled)
124+
if (this.enableAsyncCacheExceptionNoSharing)
127125
{
128126
// Creates a shallow copy of specific exception types to prevent stack trace proliferation
129127
// and rethrows them, doesn't process other exceptions.

0 commit comments

Comments
 (0)