-
Notifications
You must be signed in to change notification settings - Fork 9
Open
Description
Need
As part of every org/orgGroup ETL run, we invoke SchemaMetadata "Migrate" operation, which performs update of the SchemaMetadata for each table/ column / index metadata of the org/orgGroup, every single time.
Due to this, there exists following undesired effects
- Migrate operation costs almost 30 seconds of run-time for each org.
- Applies needless load on Avni database due to no change update operations
Recommendation (needs further analysis and prioritzation)
- Compute diffs that include Create / Update as well as Delete changes in schemaMetadata
- Only if there are changes, then perform the following snippet of code
public class SchemaMigrationService {
public Organisation migrate(Organisation organisation) {
....
schemaMetadataRepository.applyChanges(changes);
organisation.applyNewSchema(newSchemaMetadata);
schemaMetadataRepository.save(organisation.getSchemaMetadata());
....
}
}
Metadata
Metadata
Assignees
Labels
No labels
Type
Projects
Status
Focus Items