Uploaded image for project: 'JOC - JobScheduler Operations Center'
  1. JOC - JobScheduler Operations Center
  2. JOC-1958

Cleanup Service - cleanup History entries of Non-Inventory Controllers/Agents

    XMLWordPrintable

Details

    Description

      Current Situation

      • The Cleanup Service removes History entries of Controllers/Agents, following the Settings - cleanup - order_history_age.
      • For Controllers/Agents that still exist in the Inventory, at least one record (the last one) is retained, even if the cleanup duration has been exceeded.
        • This is necessary for both internal use and to ensure proper representation in the MONITOR view.
      • Conversely, History data of Controllers/Agents no longer in the Inventory will be completely purged, making them unavailable for the MONITOR interface,
        even if their retention period has not yet expired.

      Desired Behaviour

      • The Cleanup Service should only completely remove History entries of Controllers/Agents that are no longer part of the Inventory if the retention period has expired.

      Test Instructions

      • General Note:
        • Test priority: version 2.5.11
        • Ensure tests are conducted with all supported DBMS products(MySQL, Microsoft SQL Server, Oracle, PostgreSQL, H2).
      • Verify Table Entries
        • Use a database tool to check the tables HISTORY_CONTROLLERS and HISTORY_AGENTS for existing entries.
        • Restart the controller/agent if insufficient entries exist (e.g., fewer than 2).
      • Test Non-Inventory Entries
        • Simulate entries for controllers/agents no longer in the inventory by editing 2 recent entries:
          • For Table HISTORY_CONTROLLERS:
            • First entry: set READY_EVENT_ID=1, CONTROLLER_ID=fake.
            • Second entry: only set CONTROLLER_ID=fake.
          • For Table HISTORY_AGENTS:
            • First entry: set READY_EVENT_ID=1, CONTROLLER_ID=fake, AGENT_ID=fake.
            • Second entry: only set CONTROLLER_ID=fake, AGENT_ID=fake.
        • Execute Cleanup Service
          • Expected Result:
            • Entries with READY_EVENT_ID=1 should be removed.
            • Other fake entries must remain as their READY_EVENT_ID is not within the cleanup period.
        • Repeat Cleanup for Remaining Entries
          • Update READY_EVENT_ID=1 for all remaining fake entries and run the Cleanup Service again.
            • Expected Result: all fake entries should now be removed.
      • Test Inventory Entries
        • Set READY_EVENT_ID=1 for an inventory entry and execute the Cleanup Service.
        • Expected Result:
          • The entry is removed if a newer entry exists for the same controller/agent.
          • If no newer entry exists, the entry should remain. 

      Attachments

        Activity

          People

            re Robert Ehrlich
            re Robert Ehrlich
            Rajrani Upadhyay Rajrani Upadhyay
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: