Map data consistency
In this section, learn how to manage data in the catalog version:
Update data in a catalog version
To update data to a new catalog version:
- Create a new
DataStoreClient
instance pointing to a new catalog version. - Drop the
DataStoreClient
instance pointing to the old catalog version. - Clear the relevant cache on your side containing the decoder tile data from the old catalog version.
Notes:
-
Do not reuse old tile data with new catalog version data.
-
If data has not changed between the old and new catalog versions, do not handle it by yourself as only OCMAM is aware of it. In this case, OCMAM manages the data on its side.
-
To consume data from a particular catalog version, use separate DataStoreClient
instances for each catalog version. We do not recommended mixing OCM data from different DataStoreClient
instances.
-
We recommended managing the mutable and protected cache separately. To manage cache separately, create individual DataStoreClient
instances for each of the mutable and protected cache.
Evict data from a catalog version
If you no longer need data from a catalog version, you can evict it from the DataStoreServer
instance.
To evict data from the catalog version:
- Destroy all the
DataStoreClient
instances using the catalog version. -
Release the catalog from the DataStoreServer
instance using its catalog handle:
server->ReleaseCatalog( catalog_handle );
Switch to a new catalog version
Before switching to a new catalog version, perform the following actions:
- Create the
DataStoreClient
instance for the new catalog version. - Prefertch all the needed data for the new catalog version.
- Switch to the new catalog version after the data is prefetched.
- After you switch to the new catalog version, drop the
DataStoreClient
instance pointing to the old catalog version.
Notes:
-
To switch to a newer or older catalog version, destroy all the DataStoreClient
instances. When all DataStoreClient
instances are destroyed, DataStoreServer
removes the particular version from the instance automatically.
-
The catalog version remains in the DataStoreServer
for as long as at least one DataStoreClient
instance points to the catalog.