uber-go / cadence-client

Framework for authoring workflows and activities running on top of the Cadence orchestration engine.
https://cadenceworkflow.io
MIT License
345 stars 131 forks source link

Rebuild cache when executing query requests to improve latency for query workflow #1132

Open longquanzheng opened 2 years ago

longquanzheng commented 2 years ago

Is your feature request related to a problem? Please describe. Right now only executing sticky decision task can build sticky cache. But the sticky decision timeout is very short(only 5s by default). It can't be too large otherwise would cause potential workflow stuck during worker deployment.

Therefore, when workflow is waiting for something, e.g. large timer, the sticky cache would be invalid as there is no sticky cache to be used. Hence query workflow will have to replay the whole history.

Proposed Solution Let executing query request to make some sticky choice on worker and build the cache.

Additional context N/A