Skip to content

Fix flaky test on QueryBeforeStart - #12488

Open
timl3136 wants to merge 5 commits into
temporalio:mainfrom
timl3136:fix/TestQueryWorkflowSuite/TestQueryWorkflow_QueryBeforeStart
Open

timl3136 wants to merge 5 commits into
temporalio:mainfrom
timl3136:fix/TestQueryWorkflowSuite/TestQueryWorkflow_QueryBeforeStart

Conversation

@timl3136

@timl3136 timl3136 commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

What changed?

TestQueryWorkflow_QueryBeforeStartno longer starts and immediately stopsenv.SdkWorker(), and it now stops queryWorker` for better gc.

Why?

Fix flaky test described in #12486

How did you test it?

  • built
  • run locally and tested manually
  • covered by existing tests
  • added new unit test(s)
  • added new functional test(s)

@timl3136
timl3136 requested review from a team as code owners October 9, 2026 17:42
Comment thread service/matching/matching_engine.go Outdated
Comment on lines +1327 to +1328
numPartitions = max(1, e.config.NumTaskqueueReadPartitions(
nsName.String(), rootPartition.TaskQueue().Name(), request.GetTaskQueueType()))

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

this isn't right once we turn on dynamic partitioning. you need to get the value from userdatamanager.partitionscale as above. which means the root partition needs to be loaded. but it's silly to load it just for this... is there any other way to solve this problem?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Thanks, I will revert the change on matching.

@timl3136 timl3136 changed the title Fix poll cancellation for unloaded root partition and flaky test on QueryBeforeStart Fix flaky test on QueryBeforeStart Oct 9, 2026

This branch has not been deployed

No deployments
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