Skip to content

Conversation

@original-brownbear
Copy link
Contributor

@original-brownbear original-brownbear commented Nov 4, 2024

Everything synchronizes on PendingMerges, this was just a typo.

Non-issue since this hasn't been released yet. This likely fixes a bunch of other tests, I'll open a separate PR for those after going through them 1 by 1.

closes #115716

Everything synchronizes on PendingMerges, this was just a typo.
closes elastic#115716
@elasticsearchmachine elasticsearchmachine added the Team:Search Foundations Meta label for the Search Foundations team in Elasticsearch label Nov 4, 2024
@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-search-foundations (Team:Search Foundations)

@benwtrent
Copy link
Member

Looking at the PR that originally added the sync, #113355

Seems like it is only in v9? Not sure why this has a v8. tag.

Also, I don't understand why we would synchronize on QueryPhaseResultConsumer.this at all, maybe I am misreading the code, but all the elements inside those two blocks are local to PendingMerges? Could you clarify a bit there?

@original-brownbear
Copy link
Contributor Author

Thanks for taking a look Ben!

Also, I don't understand why we would synchronize on QueryPhaseResultConsumer.this at all, maybe I am misreading the code

sorry that was just me being stupid, just spotted the first mistake and got too happy that it made the failures go away ... fixed both spots now.

Seems like it is only in v9? Not sure why this has a v8. tag.

My bad yet again, should back port the other PR too. Will fix this up after.

Copy link
Member

@benwtrent benwtrent left a comment

Choose a reason for hiding this comment

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

All locking is now done on PendingMerges & MergeTask object instances. This seems better.

I do not fully know if this will fix the overall issues. But its an obvious bug in the previous refactoring. So let's first fix this. If this doesn't work, then I suggest we revert the refactoring @original-brownbear #113355

this code is tricky :)

@original-brownbear
Copy link
Contributor Author

Thanks Ben! I think this code just shouldn't be so tricky. I'm gonna follow-up here with some serious simplification now. All this does is queue and once we queued enough, merge + some checks on the stuff queued. There's no need for this to be hard :)

@original-brownbear original-brownbear merged commit 589738c into elastic:main Nov 4, 2024
16 checks passed
@original-brownbear original-brownbear deleted the fix-bunch-of-tests branch November 4, 2024 15:29
original-brownbear added a commit to original-brownbear/elasticsearch that referenced this pull request Nov 4, 2024
No need for a separate PendingMerges nested class, this thing has a lot
of state, lets accept that (for now) and keep it simple. Having a
redundant nested class already caused a bug in elastic#116171 and just adds
overhead both in runtime and when reading the code.
@original-brownbear
Copy link
Contributor Author

Actually @benwtrent turns out the remaining issue here is the result of #113230 (also mine though, sorry :/ ...) fixing it.

original-brownbear added a commit that referenced this pull request Nov 5, 2024
No need for a separate PendingMerges nested class, this thing has a lot
of state, lets accept that (for now) and keep it simple. Having a
redundant nested class already caused a bug in #116171 and just adds
overhead both in runtime and when reading the code.
@javanna javanna removed the v8.7.0 label Nov 8, 2024
jozala pushed a commit that referenced this pull request Nov 13, 2024
Everything synchronizes on PendingMerges, this was just a typo.
closes #115716
jozala pushed a commit that referenced this pull request Nov 13, 2024
No need for a separate PendingMerges nested class, this thing has a lot
of state, lets accept that (for now) and keep it simple. Having a
redundant nested class already caused a bug in #116171 and just adds
overhead both in runtime and when reading the code.
alexey-ivanov-es pushed a commit to alexey-ivanov-es/elasticsearch that referenced this pull request Nov 28, 2024
No need for a separate PendingMerges nested class, this thing has a lot
of state, lets accept that (for now) and keep it simple. Having a
redundant nested class already caused a bug in elastic#116171 and just adds
overhead both in runtime and when reading the code.
@original-brownbear original-brownbear restored the fix-bunch-of-tests branch November 30, 2024 10:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

>non-issue :Search Foundations/Search Catch all for Search Foundations Team:Search Foundations Meta label for the Search Foundations team in Elasticsearch v9.0.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[CI] IndexActionIT testAutoGenerateIdNoDuplicates failing

4 participants