Uploaded image for project: 'controller'
  1. controller
  2. CONTROLLER-1752

Something wrong with the Journal recovery

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved
    • Resolution: Done
    • Beryllium
    • None
    • clustering
    • None
    • Operating System: All
      Platform: All

    • 9008

    Description

      For example, the yang file as follows, the current-layer-link node is an exception when Journal recovery

      module simulate {
      yang-version 1;
      namespace "urn:opendaylight:params:xml:ns:yang:simulate";
      prefix "simulate";

      container forwarding {
      list top-fc {
      key "fc-id";
      leaf fc-id

      { type string; }
      leaf state { type string; }

      list fc-route {
      key "fc-route-id";
      leaf fc-route-id

      { type string; }
      leaf-list current-layer-link { type string; }

      list route-info {
      ordered-by user;
      leaf lower-fc-id

      { type string; }

      leaf-list fc-port-ref

      { ordered-by user; type string; }

      }
      }
      }
      }
      }

      First, put the fcRoute[1]

      tx1.put("forwarding/top-fc/top-fc[fc-id=01]/fc-route/fc-route[fc-route-id=0001]", fcRoute[1])

      tx1.submit()

      And then, modify the top-fc.state by merge

      topFc = tx2.read("forwarding/top-fc/top-fc[fc-id=01])
      topFc.state = disable
      tx2.merge("forwarding/top-fc/top-fc[fc-id=01], topFc)

      and put the new fcRoute[2]

      tx2.put("forwarding/top-fc/top-fc[fc-id=01]/fc-route/fc-route[fc-route-id=0002]", fcRoute[2])
      tx2.submit()

      finally, the DataTreeCandidate will get the wrong result in fcRoute[1].current-layer-link when Journal recovery

      fcRoute[1].current-layer-link's Qname will be the fc-port-ref, instead of current-layer-link

      the key point is the merge operation, it will lead to the SUBTREE_MODIFIED of fc-route[1].current-layer-link, the LeafSetNode of current-layer-link will be skipped, and write the LeafSetEntryNode of current-layer-link directly. However, the lastLeafSetQName has been set to the fc-port-ref in AbstractNormalizedNodeDataOutput because of the fcRoute[2]

      Attachments

        # Subject Branch Project Status CR V

        Activity

          People

            Unassigned Unassigned
            he.yunbo@zte.com.cn HeYunBo
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: