Skip to end of banner
Go to start of banner

Script to remove child and parent elements from data import profiles

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

MODDICONV-293 - Getting issue details... STATUS

MODDICONV-251 - Getting issue details... STATUS

MODSOURMAN-943 - Getting issue details... STATUS

Some profiles (probably crated via API) contain filled parentProfiles and childProfiles, which should be empty. These fields are filled only when constructing a response for the UI. In case profile json stores these values, they are not only redundant, but cause profile to be too heavy during processing. It may lead to slow performance of mod-data-import-converter-storage (mod-di-converter-storage since Orchid), OOM errors in mod-source-record-manager, and errors from Kafka. Such profiles need to be corrected with the following queries:

UPDATE {TENANT_ID}_mod_data_import_converter_storage.match_profiles
SET "jsonb" = jsonb_set("jsonb", '{childProfiles}', '[]')

UPDATE {TENANT_ID}_mod_data_import_converter_storage.match_profiles
SET "jsonb" = jsonb_set("jsonb", '{parentProfiles}', '[]')

UPDATE {TENANT_ID}_mod_data_import_converter_storage.action_profiles
SET "jsonb" = jsonb_set("jsonb", '{childProfiles}', '[]')

UPDATE {TENANT_ID}_mod_data_import_converter_storage.action_profiles
SET "jsonb" = jsonb_set("jsonb", '{parentProfiles}', '[]') 

UPDATE {TENANT_ID}_mod_data_import_converter_storage.job_profiles
SET "jsonb" = jsonb_set("jsonb", '{childProfiles}', '[]')

UPDATE {TENANT_ID}_mod_data_import_converter_storage.job_profiles
SET "jsonb" = jsonb_set("jsonb", '{parentProfiles}', '[]') 

UPDATE {TENANT_ID}_mod_data_import_converter_storage.mapping_profiles
SET "jsonb" = jsonb_set("jsonb", '{childProfiles}', '[]')

UPDATE {TENANT_ID}_mod_data_import_converter_storage.mapping_profiles
SET "jsonb" = jsonb_set("jsonb", '{parentProfiles}', '[]')

Deleting data from {TENANT_ID}_mod_data_import_converter_storage.profile_snapshots might also be required. In case there are errors in mod-source-record-manager - module should be restarted to clean up the caches.

  • No labels