Previous Topic: ItemReconciliationNext Topic: ReconfigDetectionAttr


MatchAlgorithms

Component reconciliation and item reconciliation use match algorithms. Two match algorithms are supported:

The algorithm has a match precedence when multiple algorithms are provided for a metric family. The order of the algorithms determines the precedence. The algorithm at the top has the highest precedence. The bottom one has the lowest precedence.

Each algorithm must have at least one matching attribute. When data matches to multiple items with the same algorithm, the item with the most matched attributes wins. When multiple matched items have the same number of matched attributes, the winner is picked at random from these items.

Examples: How the reconciliation works

Two match algorithms are provided for a metric family: alg1 and alg2. Alg1 has higher precedence than alg2. The metric family has three existing component items: 1, 2 and 3. Rediscovering the metric family finds three entries: A, B, and C. Now, we apply the two algorithms to determine which entry is new, changed, and unchanged.

   Reconciliation Meta Data                   New Data          Existing Components
<ComponentReconciliation>                        A                    1
  <MatchAlgorithms>                              B                    2
    <MatchAlgorithm1>                            C                    3
      <MatchAttribute name="attr1"/>
      <MatchAttribute name="attr2"/>
    </MatchAlgorithm1>

    <MatchAlgorithm2>
      <MatchAttribute name="attr1"/>
      <MatchAttribute name="attr3"/>
      <MatchAttribute name="attr4"/>
    </MatchAlgorithm2>

  </MatchAlgorithms>
</ComponentReconciliation>

<MatchAlgorithm1> and <MatchAlgorithm2> can be either <ExactMatch> or <BestOfMatch>. The order of the two match algorithms tells us that MatchAlgorithm1 has a higher precedence than MatchAlgorithm2.

Case 1: Unique 1-to-1 Match

Entry A matches to item 1, and item 1 does not have any other match.

A -----> 1

This example is the simplest case. This match is unique, so it does not matter if it also matches alg1 or alg2. Entry A matches item 1.

A good match algorithm produces more unique matches.

Case 2: One entry has multiple matches

Entry A matches to item 1 by alg1 and also matches to 2 by alg2.

           ---> 1 (alg1)  (1 wins)
      /
    A                    Since alg1 has higher precedence, item 1 wins the match.
      \
           ---> 2 (alg2)
Case 3: Multiple entries match to the same item with different algorithms

Entry A matches to 1 by alg1 and entry B also matches to item 1 by alg2.

A ------> 1 (alg1)  (A wins)
B ------> 1 (alg2)

Since alg1 has higher precedence, entry A wins.

Case 4: Multiple entries match to the same item with same algorithm but different numbers of matched attributes

Both A and B match to 1 by alg1.

A ------> 1 (alg1, # of matched attrs: 2)  (A wins)
B ------> 1 (alg1, # of matched attrs: 1)

Because A has more matched attributes, A wins.

If the number of match attributes is the same, the winner is randomly picked and a warning is generated.

Case 5: Mixed match 1
 alg1
  A ------------------------------------> 1
    /  alg2(match attr count: 3)
  B
    \  alg2(match attr count: 2)
           --------------------------------> 2

A matches to 1 because it matches with a higher precedence algorithm.

B matches to 2 because 1 has matched to A.

Case 6: Mixed match 2
	   ---------> 3
    /  alg1
  A                ==> A wins 3 because alg1 has a higher matching precedence
    \  alg2
       ---------> 1
    /  alg2
  B                ==> B wins 2 because alg1 has a higher matching precedence
    \  alg1
       ---------> 2
    /  alg2
  C                   ==> C has no match because 2 is matched to B and 3 is matched to A
    \  alg2
       ---------> 3

Entry C is treated as a new component. 1 is considered as an unmatched item.

The more match case 1 (unique match), the better the match algorithm is.

Can be updated: Yes

Effect of updating: Changes the component reconciliation logic.

When does the update take effect: Rediscovery

Required actions for updates to take effect: Update metric family or change vendor certification priority.

More information:

ComponentReconciliation

ItemReconciliation