Uploaded image for project: 'Ambari'
  1. Ambari
  2. AMBARI-25614

DB purge logic is wrong

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Won't Fix
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None

      Description

      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 tasks
            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_logical_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.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              ram_krish ramkrishna.s.vasudevan
            • Votes:
              1 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: