Werk #6815: HW/SW Inventory history: Fixed delta tree computation

Component HW/SW inventory
Title HW/SW Inventory history: Fixed delta tree computation
Date Nov 21, 2018
Checkmk Edition Checkmk Raw (CRE)
Checkmk Version 1.5.0p9 1.6.0b1
Level Trivial Change
Class Bug Fix
Compatibility Compatible - no manual interaction needed

Previously the delta tree of two numerations was computed in two different ways:

  • If the numerations had the same length then we assumed that each row corresponds the other one with the same index.
  • If the numerations had different length then we tried to find corresponding rows which were compared.

This might have led to wrong results regarding the new, changed and removed columns on the inventory history page. Either there might be wrong detected or not detected changes. Example: There are two numerations with same rows. If a new row is added ahead to the current numeration and the last row disappears of the current numeration then both numerations have still the same length. Above algorithm compared the rows with the same index and the result is that there are a lot of changed entries. But there is just one new row and one removed row.

Now we act the following way:

  • First we extract all identical rows.
  • Then the remaining rows from the old numeration are added to removed rows if there are no remaining rows from the current numeration resp.
  • the remaining rows from the current numeration are added to removed rows if there are no remaining rows from the old numeration.

If there are remaining rows from both numerations then we do the following:

  • If the remaining numerations have the same length then we assume that each row corresponds the other one with the same index.
  • If the remaining numerations have different length then we simply add the remaining rows from the old numeration to removed rows and the remaining rows from the current numeration to new rows.

To the list of all Werks