Skip to content

Implement workflow ID reuse rate limtier#9641

Open
prathyushpv wants to merge 4 commits intomainfrom
ppv/ReuseLimiter
Open

Implement workflow ID reuse rate limtier#9641
prathyushpv wants to merge 4 commits intomainfrom
ppv/ReuseLimiter

Conversation

@prathyushpv
Copy link
Contributor

What changed?

Implement a rate limiter to limit workflow ID reuse.

Why?

Some patterns can create large number of worklow exeuction with same IThis can cause some issues in the persistence partition.

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)

@prathyushpv prathyushpv requested review from a team as code owners March 24, 2026 17:57
Copy link
Member

@yycptt yycptt left a comment

Choose a reason for hiding this comment

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

  • We need to use businessID instead of workflowID here, as chasm executions need this as well.
  • CHASM provides separate ID space across archetypes, so the rate limiter key needs to be (nsID, businessID, archetypeID)

return s.chasmRegistry
}

func (s *ContextImpl) GetWorkflowIDReuseRL(namespaceID namespace.ID, workflowID string) quotas.RateLimiter {
Copy link
Member

@yycptt yycptt Mar 25, 2026

Choose a reason for hiding this comment

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

I don't really have strong opinion but want to understand why the RLs cache is on shard level.

@prathyushpv prathyushpv requested a review from a team as a code owner March 26, 2026 00:13
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