Is it possible to change the is_global_namespace flag for a namespace?

Once a namespace is created, it cannot change the “is_global_namespace” flag, so if you have an existing namespace that was created as non-global, you are out of luck.

  • Is there any way around this?
  • What would happen if you changed the flag in the database itself?
  • Is there a drawback to create all namespaces as global? You can do it even if you only have a single entry in clusterInformation (the only requirement is enableGlobalNamespace: true)
  • Can you change the (enableGlobalNamespace: true) flag on an already-running cluster (even if it means cycling temporal).

Thanks a lot!

  • Is there any way around this?

we are planning allowing turning local namespace to global namespace
@Yimin_Chen about ETA & progress

  • What would happen if you changed the flag in the database itself?

i guess some basic contract will be broken (undefined behavior on server)

  • Is there a drawback to create all namespaces as global? You can do it even if you only have a single entry in clusterInformation (the only requirement is enableGlobalNamespace: true)

assuming configuration is current, history server will start additional goroutines for xdc (passive task processing, e.g.), wasting some resources (maybe ok to you?)

  • Can you change the (enableGlobalNamespace: true) flag on an already-running cluster (even if it means cycling temporal).

this will enable history service to start additional goroutines managing fetching & processing tasks for xdc. this turn up (turn on?) is not well tested btw (entire xdc is experimental)

all in all, we are currently working on improving xdc, details @Yimin_Chen

Hey @Marcos.Cela,
Unfortunately there is currently no supported way to upgrade a local namespace to global namespace which works out-of-the-box. You can try to enable it manually but that is not tested at all. So I highly recommend to try it out on a test cluster before doing it in production.

  • Is there any way around this?

Most of the primitives are available and theoretically you should be able to promote a namespace to Global by updating the namespace config manually.

  • What would happen if you changed the flag in the database itself?

If the cluster is already setup for cross region replication then you should be able to update the namespace config manually. This would require you to restart the roles after the namespace config update.

  • Is there a drawback to create all namespaces as global? You can do it even if you only have a single entry in clusterInformation (the only requirement is enableGlobalNamespace: true)

There is no drawback. Even if the enableGlobalNamespace flag is true but it does not have more than one clusters specified for replication, it would still be treated as a local namespace and no replication tasks would be generated. So later when you update the namespace to include another target cluster it will only start to get replication tasks for workflow executions which are updated after the update previous ones won’t get replicated.

Thanks a lot for both responses, this has been extremely helpful to understand namespace internals!