Delays in propagating/updating search attributes on temporal cluster

Recently, we observed a couple of issues of delays between search attributes being updated and latest values being reflected when fetched, for both custom and default ones.

  1. Scenario for Custom attributes: Calling upsertSearchAttributes on a certain attribute and then fetching its value. Actual value still being the one before it was last updated.

  2. Scenario for Default attributes: Fetching ExecutionStatus of a workflow that failed, was reset and is Running again - actual value still Failed.

we are on temporal version: 1.20.3 and this was observed in typescript sdk

Is there a better way to handle this? One solution we came up with was to assert values were actually updated and add timers until the updates were propagated, but it doesn’t seem a proper way and feels more of a workaround.

Any ideas?

Can you please clarify what you mean exactly by “fetching” these values? Also, what is your use case for this update-then-fetch sequence?

Listing Workflows, with or without filtering on search attributes, goes through the Visibility store (eg Elastic Search). They are eventual consistent, which means that delays in reflecting changes is expected.