Metadata Syncing Decorator
Understanding the metadata synchronization decorator.
As we said, when the resource is saved in the Store, the metadata.syncing
field is refreshed according to the MultiRegionPolicy. See the decorator
component in the Goten repository:
runtime/multi_region/syncing_decorator.go
.
This is wrapped up by a store plugin,
runtime/store/store_plugins/multiregion_syncing_decorator.go
.
This plugin is added to all stores for all API Servers. It can be opted
out only if multi-region features are not used at all. When Deployment
sees that metadata.syncing
is not up-to-date with MultiRegionPolicy,
the empty update can handle this. Thanks to this, we could have annotated
this field as output only (in the protobuf file), and users wouldn’t be
able to make any mistakes there.