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

Add attempt-count to task processing logs, and update unit test so that it will cover deadlock #5122

Merged

Conversation

bowenxia
Copy link
Contributor

What changed?
Add attempt count into task processing logs, without using the function getAttempt().
Update unit test so that it will go into the function that cause the deadlock.

Why?
Using getAttempt() function caused us a deadlock. Avoid using it will solve this problem.
Unit test never went to the defer function. As a result it didn't detect the deadlock before.

How did you test it?
Unit test

Potential risks

Release notes

Documentation Changes

@coveralls
Copy link

coveralls commented Feb 27, 2023

Pull Request Test Coverage Report for Build 0186959a-c751-44c4-925d-5ec51aee930e

  • 1 of 8 (12.5%) changed or added relevant lines in 3 files are covered.
  • 120 unchanged lines in 18 files lost coverage.
  • Overall coverage decreased (-0.05%) to 57.173%

Changes Missing Coverage Covered Lines Changed/Added Lines %
common/log/tag/tags.go 0 2 0.0%
service/history/task/cross_cluster_task.go 0 5 0.0%
Files with Coverage Reduction New Missed Lines %
common/log/tag/tags.go 1 50.82%
service/history/queue/timer_queue_processor_base.go 1 77.26%
service/history/task/cross_cluster_task.go 1 67.72%
common/cache/lru.go 2 92.2%
common/task/weightedRoundRobinTaskScheduler.go 2 89.12%
service/history/execution/mutable_state_builder.go 2 68.76%
service/history/shard/context.go 2 66.58%
service/matching/matcher.go 2 91.46%
common/persistence/nosql/nosqlplugin/cassandra/workflow.go 3 60.0%
common/persistence/serialization/parser.go 4 65.41%
Totals Coverage Status
Change from base Build 01869460-5d34-4f7e-806c-65ae42a65489: -0.05%
Covered Lines: 85148
Relevant Lines: 148930

💛 - Coveralls

@allenchen2244 allenchen2244 self-assigned this Feb 28, 2023
@bowenxia bowenxia merged commit 412efa7 into uber:master Feb 28, 2023
@bowenxia bowenxia deleted the CDNC-2088_solve_deadlock_and_update_unit_test branch March 8, 2023 21:39
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