Skip to content

fix: check prometheus init status before use in batch processor (#8065)#8079

Merged
spacewander merged 4 commits into
apache:masterfrom
juststillthinking:check-prometheus-in-batch-processor
Oct 17, 2022
Merged

fix: check prometheus init status before use in batch processor (#8065)#8079
spacewander merged 4 commits into
apache:masterfrom
juststillthinking:check-prometheus-in-batch-processor

Conversation

@juststillthinking

Copy link
Copy Markdown
Contributor

Description

check prometheus init status before use in batch processor

Fixes #8065

Checklist

  • I have explained the need for this PR and the problem it solves
  • I have explained the changes or the new features added to this PR
  • I have added tests corresponding to this change
  • I have updated the documentation to reflect this change
  • I have verified that this change is backward compatible (If not, please discuss on the APISIX mailing list first)

tzssangglass
tzssangglass previously approved these changes Oct 13, 2022
@tzssangglass

Copy link
Copy Markdown
Member

If the error of #8065 cannot be reproduced, then the fix does not work.

Comment thread t/plugin/kafka-logger.t



=== TEST 25: access

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The test can pass even if I remove the change in the apisix/utils/batch-processor.lua.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Can you show us the route information you configured?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

It means to delete your change, the newly added test case can also pass.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I can not reproduce the problem, but the test case can reach the code line where the user report, the test case is not a good one, i will try to reproduce again.

@juststillthinking juststillthinking Oct 14, 2022

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I have reproduced the problem, accessing the router with prometheus plugin disabled will cause the problem

@juststillthinking
juststillthinking marked this pull request as draft October 14, 2022 04:42
@spacewander
spacewander merged commit df64077 into apache:master Oct 17, 2022
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.

bug: batch_process:push method failed in 2.15.0

5 participants