Skip to content

Conversation

@stefankandic
Copy link
Contributor

@stefankandic stefankandic commented Mar 13, 2024

What changes were proposed in this pull request?

Move concurrency test to the CollationFactorySuite

Why are the changes needed?

This is more appropriate location for the test as it directly uses the CollationFactory.

Also, I just found out that par method is highly discouraged and that we should use ParSeq instead.

Does this PR introduce any user-facing change?

No

How was this patch tested?

With existing UTs

Was this patch authored or co-authored using generative AI tooling?

No


test("test concurrently generating collation keys") {
// generating ICU sort keys is not thread-safe by default so this should fail
// if we don't handle the concurrency properly on Collator level
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just in case, could you point out where do we handle this?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

right now we just do it by freezing the collator as described in #45436, but we would probably have to reexamine this as current solution is not very performant

Copy link
Member

@MaxGekk MaxGekk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The test failure Run / Build modules: yarn, connect is not related to the changes, I believe.

+1, LGTM. Merging to master.
Thank you, @stefankandic.

@MaxGekk MaxGekk closed this in 6719168 Mar 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants