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

feat(pulsar): retry health check a bit before returning (r5.1) #11024

Merged

Conversation

thalesmg
Copy link
Contributor

@thalesmg thalesmg commented Jun 12, 2023

targeting release-51

Fixes https://emqx.atlassian.net/browse/EMQX-10228

This is a cosmetic fix for the Pulsar Producer bridge health check status.

Pulsar connection process is asynchronous, therefore, when a bridge of this type is created or updated (which is the same as stopping and re-creating it), the immediate status will be connecting because it’s indeed still connecting. The bridge will connect very soon afterwards (assuming there are no true network/config issue), but having to refresh the UI to see the new status and/or seeing the resource alarm might annoy users.

This workaround adds a few retries to account for that effect to reduce the probability of seeing the connecting state on such happy-paths.

After patch:

Peek.2023-06-12.11-05.mp4

Summary

🤖 Generated by Copilot at 39ea2c8

Improve health check for emqx bridge pulsar plugin by adding a retry timeout and using a macro. Change emqx_bridge_pulsar_impl_producer.erl file.

PR Checklist

Please convert it to a draft if any of the following conditions are not met. Reviewers may skip over until all the items are checked:

  • Added tests for the changes
  • Changed lines covered in coverage report
  • Change log has been added to changes/{ce,ee}/(feat|perf|fix)-<PR-id>.en.md files
  • For internal contributor: there is a jira ticket to track this change
  • If there should be document changes, a PR to emqx-docs.git is sent, or a jira ticket is created to follow up
  • Schema changes are backward compatible

Checklist for CI (.github/workflows) changes

  • If changed package build workflow, pass this action (manual trigger)
  • Change log has been added to changes/ dir for user-facing artifacts update

Fixes https://emqx.atlassian.net/browse/EMQX-10228

This is a cosmetic fix for the Pulsar Producer bridge health check status.

Pulsar connection process is asynchronous, therefore, when a bridge of this type is
created or updated (which is the same as stopping and re-creating it), the immediate
status will be connecting because it’s indeed still connecting.  The bridge will connect
very soon afterwards (assuming there are no true network/config issue), but having to
refresh the UI to see the new status and/or seeing the resource alarm might annoy users.

This workaround adds a few retries to account for that effect to reduce the probability of
seeing the `connecting` state on such happy-paths.
@thalesmg thalesmg force-pushed the pulsar-cosmetic-connecting-check-r51 branch from 39ea2c8 to db5d14d Compare June 12, 2023 13:26
@thalesmg thalesmg marked this pull request as ready for review June 12, 2023 14:19
@thalesmg thalesmg requested a review from a team as a code owner June 12, 2023 14:19
@thalesmg thalesmg merged commit c11011d into emqx:release-51 Jun 12, 2023
113 checks passed
@thalesmg thalesmg deleted the pulsar-cosmetic-connecting-check-r51 branch June 12, 2023 16:01
@yanzhiemq
Copy link
Collaborator

yanzhiemq commented Jun 13, 2023

Enhancements

  • Added a small improvement to reduce the chance of seeing the connecting state when creating/updating a Pulsar Producer bridge.

@yanzhiemq
Copy link
Collaborator

yanzhiemq commented Jun 13, 2023

增强

  • 添加了一个小的改进,以减少在创建/更新 Pulsar 生产者桥接时看到connecting 状态的机会。

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.

None yet

3 participants