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

Remove RaftLogReader#isEmpty #6339

Merged
2 commits merged into from
Feb 15, 2021
Merged

Remove RaftLogReader#isEmpty #6339

2 commits merged into from
Feb 15, 2021

Conversation

npepinpe
Copy link
Member

Description

This PR removes RaftLogReader#isEmpty in order to simplify #6307. It removes the call to check if the journal is empty and simply scans the log for ZeebeEntry. This is a naive implementation which may be slow, however in practice the log is made up of mostly ZeebeEntry, or it's empty - in which case it should return fairly quickly.

Related issues

related to #6307

Definition of Done

Not all items need to be done depending on the issue and the pull request.

Code changes:

  • The changes are backwards compatibility with previous versions
  • If it fixes a bug then PRs are created to backport the fix to the last two minor versions. You can trigger a backport by assigning labels (e.g. backport stable/0.25) to the PR, in case that fails you need to create backports manually.

Testing:

  • There are unit/integration tests that verify all acceptance criterias of the issue
  • New tests are written to ensure backwards compatibility with further versions
  • The behavior is tested manually
  • The change has been verified by a QA run
  • The impact of the changes is verified by a benchmark

Documentation:

  • The documentation is updated (e.g. BPMN reference, configuration, examples, get-started guides, etc.)
  • New content is added to the release announcement

@npepinpe npepinpe self-assigned this Feb 15, 2021
@npepinpe npepinpe removed the request for review from MiguelPires February 15, 2021 09:12
@npepinpe
Copy link
Member Author

Ah, wait, this PR is based on a different branch. Let me rebase before you review.

Copy link
Contributor

@MiguelPires MiguelPires left a comment

Choose a reason for hiding this comment

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

This doesn't remove isEmpty from the JournalReader and all its implementations. Is there a reason you're keeping those?

@npepinpe
Copy link
Member Author

npepinpe commented Feb 15, 2021

Right now to keep the PR small and focused, as it seemed a bit out of scope for me - I would like to challenge the use of isEmpty and any other "unnecessary" APIs after #6307 as clean up tasks.

@MiguelPires MiguelPires self-requested a review February 15, 2021 15:59
Copy link
Contributor

@MiguelPires MiguelPires left a comment

Choose a reason for hiding this comment

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

bors r+

@ghost
Copy link

ghost commented Feb 15, 2021

Build succeeded:

@ghost ghost merged commit f715b89 into develop Feb 15, 2021
@ghost ghost deleted the np-raftlogreader-drop-isempty branch February 15, 2021 16:24
github-merge-queue bot pushed a commit that referenced this pull request Mar 14, 2024
* fix: improve error messages for select filters

* fix: reuse already created error message object to avoid code duplication, remove unused date property
This pull request was closed.
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.

2 participants