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 get workflow execution from database when shard is closed #5697

Merged
merged 2 commits into from
Mar 1, 2024

Conversation

Shaddoll
Copy link
Member

@Shaddoll Shaddoll commented Mar 1, 2024

What changed?
Do not get workflow execution from database when shard is closed

Why?
When a shard is closed, we should stop all the operations to the database from that shard. Read operation was allowed because it is safe. But since we do a checksum validation after GetWorkflowExecution from database, a false negative result might be returned from the validation if we allow reading data after a shard is closed.

How did you test it?
unit test

Potential risks

Release notes

Documentation Changes

@coveralls
Copy link

coveralls commented Mar 1, 2024

Pull Request Test Coverage Report for Build 018dfb02-1f63-4e69-abf8-09bb457166a4

Details

  • 7 of 7 (100.0%) changed or added relevant lines in 3 files are covered.
  • 71 unchanged lines in 10 files lost coverage.
  • Overall coverage decreased (-0.03%) to 62.843%

Files with Coverage Reduction New Missed Lines %
service/history/task/fetcher.go 2 85.05%
common/persistence/statsComputer.go 3 93.57%
service/history/queue/timer_queue_processor_base.go 3 77.82%
service/matching/taskListManager.go 3 79.7%
service/frontend/wrappers/metered/metered.go 4 65.5%
service/history/task/transfer_standby_task_executor.go 4 87.84%
tools/cli/admin_db_decode_thrift.go 4 67.95%
service/history/task/cross_cluster_task_processor.go 8 80.79%
common/persistence/sql/workflowStateMaps.go 11 81.25%
service/history/execution/mutable_state_task_refresher.go 29 59.81%
Totals Coverage Status
Change from base Build 018df99b-a386-4814-ad28-09490f5042bf: -0.03%
Covered Lines: 92889
Relevant Lines: 147811

💛 - Coveralls

@Shaddoll Shaddoll enabled auto-merge (squash) March 1, 2024 17:14
@Shaddoll Shaddoll merged commit 3f64176 into cadence-workflow:master Mar 1, 2024
16 of 17 checks passed
@Shaddoll Shaddoll deleted the shard branch March 1, 2024 17:46
request *persistence.GetWorkflowExecutionRequest,
) (*persistence.GetWorkflowExecutionResponse, error) {
if s.isClosed() {
return nil, ErrShardClosed
Copy link
Member

Choose a reason for hiding this comment

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

great find

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