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

Do not return not exists error in history pagination function #5054

Merged
merged 3 commits into from
Jan 4, 2023

Conversation

Shaddoll
Copy link
Contributor

What changed?
Do not return not exists error in history pagination function

Why?
For a history paginator, if there is no history events, we should not return entity not exists error but stop the iteration.

How did you test it?

Potential risks

Release notes

Documentation Changes

@coveralls
Copy link

coveralls commented Dec 20, 2022

Pull Request Test Coverage Report for Build 018578ab-7990-4740-b908-f87adbfe9585

  • 0 of 8 (0.0%) changed or added relevant lines in 1 file are covered.
  • 75 unchanged lines in 17 files lost coverage.
  • Overall coverage decreased (-0.004%) to 57.233%

Changes Missing Coverage Covered Lines Changed/Added Lines %
common/persistence/persistence-utils/historyManagerUtil.go 0 8 0.0%
Files with Coverage Reduction New Missed Lines %
common/types/shared.go 1 41.76%
service/history/queue/transfer_queue_processor_base.go 1 77.62%
client/history/client.go 2 38.1%
client/history/metricClient.go 2 45.3%
common/util.go 2 52.54%
service/history/execution/mutable_state_builder.go 2 68.85%
service/history/handler.go 2 47.15%
service/history/task/transfer_active_task_executor.go 2 72.22%
service/matching/taskListManager.go 2 76.62%
common/cache/lru.go 3 90.73%
Totals Coverage Status
Change from base Build 01855e4e-1a58-4c8e-a8bf-5e154102e721: -0.004%
Covered Lines: 84927
Relevant Lines: 148387

💛 - Coveralls

@davidporter-id-au
Copy link
Contributor

Can you provide a bit more detail as to this scenario? Under conditions is returning no history a valid state?

Copy link
Contributor

@allenchen2244 allenchen2244 left a comment

Choose a reason for hiding this comment

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

LGTM

@Shaddoll
Copy link
Contributor Author

Shaddoll commented Jan 3, 2023

Can you provide a bit more detail as to this scenario? Under conditions is returning no history a valid state?

@davidporter-id-au We have some helper functions iterating workflow histories. The iterator provides HasNext() and Next() functions to iterate histories. But if the workflow history doesn't exist, the first iteration of HasNext() doesn't return false, and when we call Next(), we get an error. I think for an iterator, this behavior is not what we want, and it actually breaks the timer resurrection checker, because when we get an EntityNotExist error, the timer tasks stops retrying

@davidporter-id-au
Copy link
Contributor

nice, thank you for the explanation

@davidporter-id-au davidporter-id-au merged commit 747b58e into uber:master Jan 4, 2023
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.

4 participants