Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes #1332: Deep Comparison for Array-based Concurrency tokens. #1334

Open
wants to merge 5 commits into
base: release-8.x
Choose a base branch
from

Conversation

anasik
Copy link

@anasik anasik commented Oct 28, 2024

Fixes #1332

A popular convention today for concurrency check fields is to use a byte[] field called RowVersion with a Timestamp or ConcurrencyCheck attribute.

However, when using such a field, the queryOptions.ifNoneMatch.ApplyTo call was having absolutely no effect. That's because ApplyTo was internally using Expression.Equal which is perfect for value types but doesn't fare very well against reference types or particularly Arrays.

I fixed this by adding a case for arrays that, through a helper method, generates an expression that performs a deep comparison.

@anasik anasik marked this pull request as ready for review October 28, 2024 21:12
@anasik
Copy link
Author

anasik commented Nov 4, 2024

@WanjohiSammy , may I interest you in this?

@anasik
Copy link
Author

anasik commented Nov 13, 2024

@xuzhg, it's been a little quiet here. Maybe I can help with something?

@anasik
Copy link
Author

anasik commented Nov 27, 2024

@xuzhg , @WanjohiSammy, I see you guys were busy with the 8.2.6 release. Just bumping this in case it got lost or forgotten.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant