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

elasticsearch: use backpressure to resolve streaming request flakes #3236

Merged
merged 1 commit into from
Dec 4, 2023

Conversation

minwoox
Copy link
Contributor

@minwoox minwoox commented Oct 15, 2020

The HttpResponse was sent before the request are fully sent.
So the request was aborted after getting the response. This changes
to send the response after the request is fully received.

Fixes #3197

@minwoox
Copy link
Contributor Author

minwoox commented Oct 15, 2020

CI failed with the same cause in another test. 😅 Let me fix that too, after lunch. 😄

@minwoox
Copy link
Contributor Author

minwoox commented Oct 15, 2020

Finally, it succeeded. 😅
Let me rebuild a couple of times though.

Copy link
Member

@codefromthecrypt codefromthecrypt left a comment

Choose a reason for hiding this comment

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

Thanks I like the green color a lot!

Can you help with comments to ensure I understand?

Also, is it temporary that we have to check the isEndOfStream flag? EG, could armeria do that internally? If so, possibly mark an issue in a comment so we don't forget?

@minwoox
Copy link
Contributor Author

minwoox commented Oct 16, 2020

@adriancole Do you have a chance to rebuild this a couple of times? 😅

@codefromthecrypt
Copy link
Member

I clicked rebuild.. you can also rebase into one commit off latest master and force push your branch. pretty confident so far

@codefromthecrypt
Copy link
Member

OK will merge on last green. the comment editing should show this is all working :D Massive thanks @minwoox!

@codefromthecrypt
Copy link
Member

if you don't mind, rebase and squash onto latest master. not a big deal if can't

@minwoox
Copy link
Contributor Author

minwoox commented Oct 16, 2020

if you don't mind, rebase and squash onto latest master. not a big deal if can't

After I merged the master, I got this error while building
Some files do not have the expected license header
How can I check which files do not have the expected license?

@codefromthecrypt
Copy link
Member

in .github/CONTRIBUTING.md there's this ./mvnw com.mycila:license-maven-plugin:format

I corrected the problematic license in master, but you can run it again after rebase anyway.

@minwoox
Copy link
Contributor Author

minwoox commented Oct 16, 2020

Let me merge master again, then. 😄

@minwoox
Copy link
Contributor Author

minwoox commented Oct 22, 2020

Let me fix this #3239 in different PR.
Somehow it's not working. 😓

@minwoox minwoox changed the title Fix flaky test in ITElasticsearchHealthCheck Update Armeria to 1.2.0 and Netty to 4.1.53 Oct 22, 2020
Copy link
Member

@codefromthecrypt codefromthecrypt left a comment

Choose a reason for hiding this comment

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

Exciting! If you have some time, lets get all 1.2 related in the same bucket?

wanna remove some of the log hushing in zipkin-server-shared.yml now?

  • (not sure which are needed anymore)

and maybe the TRACE workaround in ZipkinHttpConfiguration

@minwoox
Copy link
Contributor Author

minwoox commented Oct 22, 2020

and maybe the TRACE workaround in ZipkinHttpConfiguration

I left a comment on this. 😄 #3236 (comment)
Let me solve it in different PR.

@codefromthecrypt
Copy link
Member

[INFO] -------------------------------------------------------

[INFO] Running zipkin2.elasticsearch.integration.ITElasticsearchStorageV6

2020-10-22 08:05:47:143 [main] WARN org.testcontainers.utility.RegistryAuthLocator - Failure when attempting to lookup auth config (dockerImageName: testcontainers/ryuk:0.3.0, configFile: /home/travis/.docker/config.json. Falling back to docker-java default behaviour. Exception message: /home/travis/.docker/config.json (No such file or directory)

2020-10-22 08:06:14:605 [main] WARN zipkin2.elasticsearch.integration.ITElasticsearchStorage - The ElasticSearch instance used during IT's is using deprecated features or configuration. This is likely nothing to be really worried about (for example 'xpack.monitoring.enabled' setting), but nevertheless it should be looked at to see if our docker image used during integration tests needs updating for the next version of ElasticSearch. See https://www.elastic.co/guide/en/elasticsearch/reference/current/migration-api-deprecation.htmlfor more information. This is the deprecation warning we received:

{"error":"Incorrect HTTP method for uri [/_migration/deprecations] and method [GET], allowed: [POST]","status":405}

[INFO] Running zipkin2.elasticsearch.integration.ITElasticsearchStorage$ITDependenciesHeavy

@minwoox minwoox changed the title Update Armeria to 1.2.0 and Netty to 4.1.53 Use back pressure for streaming request Oct 22, 2020
@minwoox minwoox changed the title Use back pressure for streaming request Use backpressure for streaming request Oct 22, 2020
@darkmastermindz
Copy link
Contributor

If I'm reading this correctly, #3557 PR - Has a dependency on this to fix #3197 @minwoox @jcchavezs

@codefromthecrypt
Copy link
Member

currently looking at renovating this one

The `HttpResponse` was sent before the request are fully sent.
So the request was aborted after getting the response.

We should change to send the response after the request is fully received.
- close openzipkin#3197

Signed-off-by: Adrian Cole <adrian@tetrate.io>
@codefromthecrypt codefromthecrypt changed the title Use backpressure for streaming request elasticsearch: use backpressure to resolve streaming request flakes Dec 4, 2023
@codefromthecrypt codefromthecrypt changed the title elasticsearch: use backpressure to resolve streaming request flakes elasticsearch: use backpressure to resolve streaming request flakes Dec 4, 2023
@codefromthecrypt
Copy link
Member

ok 🤞 salvaging a three year old change!

@@ -47,26 +50,36 @@ public class ITElasticsearchHealthCheck {

static final SettableHealthChecker server1Health = new SettableHealthChecker(true);

static {
// Gives better context when there's an exception such as AbortedStreamException
System.setProperty("com.linecorp.armeria.verboseExceptions", "always");
Copy link
Member

Choose a reason for hiding this comment

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

already in log config, but also we weren't getting exceptions ;)

@codefromthecrypt codefromthecrypt merged commit 81b8f16 into openzipkin:master Dec 4, 2023
9 checks passed
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.

Flakey Test: ITElasticsearchHealthCheck.oneHealthy
4 participants