ambari-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ramkrishna.s.vasudevan (Jira)" <>
Subject [jira] [Created] (AMBARI-25614) DB purge logic is wrong
Date Wed, 03 Feb 2021 09:11:00 GMT
ramkrishna.s.vasudevan created AMBARI-25614:

             Summary: DB purge logic is wrong
                 Key: AMBARI-25614
             Project: Ambari
          Issue Type: Bug
            Reporter: ramkrishna.s.vasudevan

While purging the DB, we get the 
      // find task ids using request stage ids
      Set<Long> taskIds = hostRoleCommandDAO.findTaskIdsByRequestStageIds(requestStageIds);
      // find host task ids, to find related host requests and also to remove needed host
      final Set<Long> hostTaskIds = findHostTaskIds(taskIds);
      // find host request ids by host task ids to remove later needed host requests
      final Set<Long> hostRequestIds = findHostRequestIds(hostTaskIds);
      final Set<Long> topologyRequestIds = findTopologyRequestIds(hostRequestIds);
The hostRequestIds are already got from the topology_host_task table. Those hostRequestIds
are now used to find the topologyrequestIds. Internally those should be got from the topology_host_request
table. But we instead again go to the topology_host_task table.

Here what evern toplogyRequestIDs we get do not  match with the actual Topology_requests.
Hence the delete fails saying no such requestID found. 

This message was sent by Atlassian Jira

View raw message