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 #12544: Make UpdateAtomic Delegates distinct #12545

Merged
merged 3 commits into from
Oct 9, 2022
Merged

Conversation

jtkech
Copy link
Member

@jtkech jtkech commented Oct 2, 2022

Fixes #12544

Here the comment of the related issue

Maybe I'm alone to use IVolatileDocumentManager.UpdateAtomicAsync(), see #10673 where we fixed a first problem but the 2nd concern is still there, otherwise it works well.

So, when enlisting multiple update delegates (not allowed with the regular UpdateAsync()) in bulk actions, we can still enlist multiple times the same delegate, we wanted to make the results of the delegate invocation list distincts, but they are wrapped objects for which the equality operator overload is not sufficient.

I fixed it locally by checking the Target directly on the the delegates passed as parameters, this in place of checking the delegates retrieved from the invocation list of the combined delegate.

Note: Currently as a workaround I overrided the implementation which doesn't have a lot of code as it is a derived class.

@jtkech jtkech changed the title Execute same delegate once Fixes #12544: Make UpdateAtomic Delegates distinct Oct 2, 2022
@jtkech jtkech merged commit 7c44384 into main Oct 9, 2022
@jtkech jtkech deleted the jtkech/delegate-target branch October 9, 2022 02:25
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.

Make UpdateAtomic Delegates distinct
2 participants