-
Notifications
You must be signed in to change notification settings - Fork 562
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
Add endpoint to enable exporter #19261
Conversation
dist/src/main/java/io/camunda/zeebe/shared/management/ExportersEndpoint.java
Outdated
Show resolved
Hide resolved
zeebe/broker/src/main/java/io/camunda/zeebe/broker/exporter/stream/ExporterDirector.java
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🤔 Is there no test to check that the director is now idle? What would be the impact if it wasn't and we don't verify this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can test if the state is idle. But it is not adding much value. Testing whether it has stopped all services is a bit more tricky. The main requirement is that once we disable all exporters, we can enable new ones later. This is tested in the ExporterEnableTest
.
The impact if it did not stop all services is that is unnecessarily consuming CPU cycles - it reads the log entry for every commit even if there are no exporters to export.
zeebe/qa/integration-tests/src/test/java/io/camunda/zeebe/it/exporter/ExporterEnableTest.java
Outdated
Show resolved
Hide resolved
On idle, it stops receiving notification from logstream commits and also stops the distribution service. When new exporters are configured, it will restart exporting again.
ExporterDirector does not close if no exporters are configured. Instead it just goes to an idle state. So the tests that wait for it to be closed is updated.
1888509
to
4c30b88
Compare
Merge failed due to
retrying. |
😭 I'm really unlucky today. Merge failed again due to "self hosted runner lost communication with the server". Retrying.. |
Description
This PR combines two things
ExporterDirector
does not close itself when no exporters are configured. Instead it goes to an idle state, where the actor is still running, but it is not actively doing any tasks. When a new exporter is enabled, it will become active again and starts all necessary services to resume exporting.Related issues
closes #19022
closes #18752