You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
> Which would confirm your hunch @KrzysztofCwalina because that encodes big endian and reads big endian in the read methods. So we would always hit the ToArray case 😭
My understanding is that TryRead should only be used for little endian, not that it would return false on big endian. This means that the current code could end up reversing the lock token if the client machine is actually big endian. Using the Guid constructor handles both cases at the cost of us needing to allocate always. We can do an endian check ourselves to only use TryRead for little endian to avoid the extra allocation.
Re: the AMQP lib handling that could cause issues now that we no longer have full control over the machine where the ReceivedMessage is serialized. Since we are serializing the received message as part of this PR, we should probably file an issue so that the AMQP lib has handling for endianness.
My understanding is that TryRead should only be used for little endian, not that it would return false on big endian. This means that the current code could end up reversing the lock token if the client machine is actually big endian. Using the Guid constructor handles both cases at the cost of us needing to allocate always. We can do an endian check ourselves to only use TryRead for little endian to avoid the extra allocation.
Re: the AMQP lib handling that could cause issues now that we no longer have full control over the machine where the ReceivedMessage is serialized. Since we are serializing the received message as part of this PR, we should probably file an issue so that the AMQP lib has handling for endianness.
Originally posted by @JoshLove-msft in Azure/azure-sdk-for-net#33682 (comment)
The text was updated successfully, but these errors were encountered: