Skip to content

[Test] Use thread-safe hashSet for result collection #85653

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

Merged
merged 1 commit into from
Apr 12, 2022

Conversation

ywangd
Copy link
Member

@ywangd ywangd commented Apr 2, 2022

Use regular HashSet in a deliberate concurrency code block sometimes
results into unexpected behaviour: The hashSet has only a single item
but size() reports 2. This PR replaces the regular hashSet with a
thread-safe version to fix spurious test failures.

Resolves: #85411

Use regular HashSet in a deliberate concurrency code block sometimes
results into unexpected behaviour: The hashSet has only a single item
but size() reports 2. This PR replaces the regular hashSet with a
thread-safe version to fix spurious test failures.

Resolves: elastic#85411
@ywangd ywangd added >test Issues or PRs that are addressing/adding tests :Security/Security Security issues without another label auto-backport-and-merge v8.2.0 v8.3.0 labels Apr 2, 2022
@ywangd ywangd requested a review from albertzaharovits April 2, 2022 05:41
@elasticmachine elasticmachine added the Team:Security Meta label for security team label Apr 2, 2022
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-security (Team:Security)

Copy link
Contributor

@tvernum tvernum left a comment

Choose a reason for hiding this comment

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

LGTM

@ywangd ywangd merged commit 15b56ef into elastic:master Apr 12, 2022
ywangd added a commit to ywangd/elasticsearch that referenced this pull request Apr 12, 2022
Use regular HashSet in a deliberate concurrency code block sometimes
results into unexpected behaviour: The hashSet has only a single item
but size() reports 2. This PR replaces the regular hashSet with a
thread-safe version to fix spurious test failures.

Resolves: elastic#85411
@elasticsearchmachine
Copy link
Collaborator

💚 Backport successful

Status Branch Result
8.2

elasticsearchmachine pushed a commit that referenced this pull request Apr 12, 2022
Use regular HashSet in a deliberate concurrency code block sometimes
results into unexpected behaviour: The hashSet has only a single item
but size() reports 2. This PR replaces the regular hashSet with a
thread-safe version to fix spurious test failures.

Resolves: #85411
weizijun added a commit to weizijun/elasticsearch that referenced this pull request Apr 13, 2022
* upstream/master: (40 commits)
  Fix BuildTests serialization (elastic#85827)
  Use urgent priority for node shutdown cluster state update (elastic#85838)
  Remove Task classes from HLRC (elastic#85835)
  Remove unused migration classes (elastic#85834)
  Remove uses of Charset name parsing (elastic#85795)
  Remove legacy versioned logic for DefaultSystemMemoryInfo (elastic#85761)
  Expose proxy settings for GCS repositories (elastic#85785)
  Remove SLM classes from HLRC (elastic#85825)
  TSDB: fix the time_series in order collect priority (elastic#85526)
  Remove ILM classes from HLRC (elastic#85822)
  FastVectorHighlighter should use ValueFetchers to load source data (elastic#85815)
  Iteratively execute synchronous ingest processors (elastic#84250)
  Remove TransformClient from HLRC  (elastic#85787)
  Mute XPackRestIT deprecation/10_basic/Test Deprecations (elastic#85807)
  Unmute Lintian packaging test (elastic#85778)
  Add a highlighter unit test base class (elastic#85719)
  Remove NIO Transport Plugin (elastic#82085)
  [TEST] Remove token methods from HLRC SecurityClient (elastic#85515)
  [Test] Use thread-safe hashSet for result collection (elastic#85653)
  [TEST] Mute BuildTests.testSerialization (elastic#85801)
  ...

# Conflicts:
#	server/src/test/java/org/elasticsearch/search/aggregations/timeseries/TimeSeriesIndexSearcherTests.java
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Security/Security Security issues without another label Team:Security Meta label for security team >test Issues or PRs that are addressing/adding tests v8.2.0 v8.3.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[CI] ProfileDomainIntegTests testConcurrentCreationOfNewProfiles failing
4 participants