Timeout when deleting an environment from a project/version in TDM Portal
search cancel

Timeout when deleting an environment from a project/version in TDM Portal

book

Article ID: 415430

calendar_today

Updated On:

Products

CA Test Data Manager (Data Finder / Grid Tools)

Issue/Introduction

We have an issue with the API, when we call the endpoint /TDMDataReservationService/api/ca/v1/environments with DELETE option, we got a timeout after 1 hour.

Could you explain why it take so much time to delete this data and how to improve this action?

Environment

TDM 4.11

Cause

When deleting an environment, there's a lot of data that needs to be cleaned up in both the gtrep repository and the OrientDB database. Unfortunately, we can't say how long the cleanup will take for the databases.

Broadcom recommends you work with your DBA when deleting the environments from TDM Portal. If your DBA see something that would help with the performance, we will definitely take that into consideration, and do what we can to improve the performance. At this time, we believe that because there was so much data to clean, that is why you are seeing the delay.

There are numerous tables touched when deleting TDM environments (almost all gtrep_* tables at some point), but the one that probably contain the most data would be the Data Discovery tables:

  • gtrep_datadisc_ent_attr_def
  • gtrep_datadisc_ent_key_def
  • gtrep_datadisc_entity_def
  • gtrep_datadisc_hierarchy
  • gtrep_datadisc_job

These tables might be a good place to have your DBA take a look, and see which queries are taking a long time to complete.

Resolution

The customer worked with their DBA, and it appears that some indexes and stats were not correct in their Oracle DB. They rebuilt the index and refresh all stats to optimize the plan. 
In parallel, they also deleted some old project/version to be able to reduce the DB size, which in turn reduced time to get data from DB.