Skip to content

Conversation

@original-brownbear
Copy link
Contributor

Polling Future.isDone is obviously nonsense. Surprisingly, We can save a couple seconds fixing up these spots (especially the CCS ones).
Seemingly this also fixes testCancel (tested by unmuting) but I left it muted for now to be investigated in the dedicated issue for that.
Adding search label since most of the fixed tests are from search.

Polling `Future.isDone` is obviously nonesense. Suprisingly enough, We can save a couple seconds fixing up these spots (especially the CCS ones).
@original-brownbear original-brownbear added >non-issue :Search/Search Search-related issues that do not fall into other categories labels Dec 19, 2024
@elasticsearchmachine elasticsearchmachine added Team:Search Meta label for search team v9.0.0 labels Dec 19, 2024
@elasticsearchmachine
Copy link
Collaborator

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

});
assertBusy(() -> assertTrue(future.isDone()));
try {
future.get();
Copy link
Contributor

Choose a reason for hiding this comment

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

Should you use a timed get to avoid an infinite wait scenario?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good question :) "infinite wait" practically means 20min with the suite timeout we have in place.
To be honest, I kinda like not putting timeouts on these things personally. If the listener leaks due to a bug, yes CI will run for 20 min, but so be it? :) If I fail after a 20 min wait, I'm close to 100% sure it wasn't a slow CI run that failed things. Otoh, if it's a 10s wait ... the first thing my mind will jump to is wonder if we conceivably could have had have a 10s GC or so pause here :)
-> personally I wouldn't add timeouts on future.get() in tests anywhere pretty much I think.

@original-brownbear original-brownbear added auto-backport Automatically create backport pull requests when merged v8.18.0 labels Dec 19, 2024
@original-brownbear original-brownbear merged commit 71d88e3 into elastic:main Dec 19, 2024
16 checks passed
@original-brownbear original-brownbear deleted the remove-pointless-busy-wait branch December 19, 2024 19:18
original-brownbear added a commit to original-brownbear/elasticsearch that referenced this pull request Dec 19, 2024
Polling `Future.isDone` is obviously nonesense. Suprisingly enough, We can save a couple seconds fixing up these spots (especially the CCS ones).
elasticsearchmachine pushed a commit that referenced this pull request Dec 19, 2024
…19138) Polling `Future.isDone` is obviously nonesense. Suprisingly enough, We can save a couple seconds fixing up these spots (especially the CCS ones).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

auto-backport Automatically create backport pull requests when merged >non-issue :Search/Search Search-related issues that do not fall into other categories Team:Search Meta label for search team v8.18.0 v9.0.0

4 participants