SqlClient minor fix and changes#35344
Conversation
| _physicalStateObj.SniContext = SniContext.Snix_ProcessSspi; | ||
| // allocate received buffer based on length from SSPI message | ||
| byte[] receivedBuff = new byte[receivedLength]; | ||
| byte[] receivedBuff = ArrayPool<byte>.Shared.Rent(receivedLength); |
There was a problem hiding this comment.
I assume throw SQL.SynchronousCallMayNotPend(); is not commonly taken, otherwise we should return the array in that path.
There was a problem hiding this comment.
It's a real error if it occurs, it means someone has tried to do asynchronous things in a synchronous context. It's a programming error if that happens and It'll blow up the unit tests all over the place.
|
@afsanehr @tarikulsabbir @Gary-Zh @David-Engel what are next steps here? Can you please code review? (it's been 2 weeks since the PR was created ...) |
|
Hi @Wraith2 , we are reviewing this PR but CI fails because to run it properly, we need a newer version of code. Could you please update this PR to the latest? |
|
Updated. |
|
The CI failure is a catastrohic failure of the entire ubuntu run, all other legs ran successfully. It could be retriggered but i don't think it's worth it since everything else passed and nothing is linux ditrro specific in this library. |
SqlClient minor fix and changes Commit migrated from dotnet/corefx@9fef9c9
Fixes https://github.com/dotnet/corefx/issues/30650
3 tiny changes:
Interlocked.CompareExchangeso if two threads cause initialization of the synonyms dictionary the first writer wins and the write instruction is thread/cache aware.function and manual tests run in native mode.
/cc @afsanehr, @tarikulsabbir, @David-Engel