Skip to content

Conversation

@rkhachatryan
Copy link
Contributor

Backport #27089 to release-2.0

If a resource is lazily created in open, we can only close after checking for null. Otherwise a failure during initialization will trigger secondary failures.
@flinkbot
Copy link
Collaborator

flinkbot commented Dec 11, 2025

CI report:

Bot commands The @flinkbot bot supports the following commands:
  • @flinkbot run azure re-run the last Azure build

@rkhachatryan
Copy link
Contributor Author

@flinkbot run azure

spanProcessor.close();
spanExporter.flush();
spanExporter.close();
if (spanProcessor != null) {
Copy link
Contributor

Choose a reason for hiding this comment

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

I know this is a back port, I am wondering if we get an exception processing the spanProcessor shouldn't we still try to clean up spanExporter if we have one. i.e. put the spanExporter code in a finally.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

According to the code, spanProcessor and spanExporter must be either null or not null both.

@gustavodemorais
Copy link
Contributor

@flinkbot run azure

@rkhachatryan
Copy link
Contributor Author

Test failure seems to be unrelated (failed to download cri-dockerd), merging.

@rkhachatryan rkhachatryan merged commit 0c958e8 into apache:release-2.0 Dec 15, 2025
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.

5 participants