[OpenNMS/opennms] 2d9c2d: NMS-19971: FK with ON DELETE SET NULL for node.nod...

OpenNMS Machine User via opennms-cvs <[email protected]>
Newsgroups gmane.network.opennms.cvs
Message-ID <OpenNMS/opennms/push/refs/heads/merge-foundation/release-36.x-to-develop/[email protected]>
  Branch: refs/heads/merge-foundation/release-36.x-to-develop
  Home:   https://github.com/OpenNMS/opennms
  Commit: 2d9c2d60a3293641c4514ff2bce039dec8ef30d2
      https://github.com/OpenNMS/opennms/commit/2d9c2d60a3293641c4514ff2bce039dec8ef30d2
  Author: Marshall Massengill <[email protected]>
  Date:   2026-07-13 (Mon, 13 Jul 2026)

  Changed paths:
    A core/schema/src/main/liquibase/36.0.3/changelog.xml
    M core/schema/src/main/liquibase/changelog.xml

  Log Message:
  -----------
  NMS-19971: FK with ON DELETE SET NULL for node.nodeparentid

node.nodeparentid (the path-outage/critical-path parent, OnmsNode.getParent())
had no foreign-key constraint, so deleting a parent node left its children
pointing at a nonexistent row. Dereferencing the lazy parent proxy for such a
dangling reference throws Hibernate ObjectNotFoundException, and no deletion
path cleaned it up: DefaultProvisionService.deleteNode() removes only the node
row, and vacuumd deletes type-'D' nodes via raw SQL that bypasses application
logic entirely.

Fix at the database level so every deletion path is covered. New 36.0.3
changeset: null out already-dangling references, index node(nodeparentid),
then add a self-referential FK node.nodeparentid -> node.nodeid with
onDelete=SET NULL -- the pattern ipInterface already uses for snmpinterfaceid
(snmpinterface_fkey2). Registered in the master changelog after 36.0.1.


  Commit: 5932d2603c99d4ae037d2ab711a43040ad39b38d
      https://github.com/OpenNMS/opennms/commit/5932d2603c99d4ae037d2ab711a43040ad39b38d
  Author: Marshall Massengill <[email protected]>
  Date:   2026-07-13 (Mon, 13 Jul 2026)

  Changed paths:
    M features/topology-map/plugins/org.opennms.features.topology.plugins.topo.pathoutage/src/test/java/org/opennms/features/topology/plugins/topo/pathoutage/PathOutageStatusProviderIT.java

  Log Message:
  -----------
  NMS-19971: save path-outage test nodes parent-first

The new node.nodeparentid FK rejects a child row inserted before its parent.
PathOutageStatusProviderIT saved its generated nodes while iterating a HashMap
keySet (undefined order), so a child could be inserted first and trip
node_nodeparentid_fkey. Save in ascending node-id order instead; every
generated child has a larger id than its parent, so parents insert first.


  Commit: 14fe0f2bc9a180f17fbe9c32cdd9029d8bf2c1a6
      https://github.com/OpenNMS/opennms/commit/14fe0f2bc9a180f17fbe9c32cdd9029d8bf2c1a6
  Author: Marshall Massengill <[email protected]>
  Date:   2026-07-14 (Tue, 14 Jul 2026)

  Changed paths:
    A core/schema/src/main/liquibase/36.0.3/changelog.xml
    M core/schema/src/main/liquibase/changelog.xml
    M features/topology-map/plugins/org.opennms.features.topology.plugins.topo.pathoutage/src/test/java/org/opennms/features/topology/plugins/topo/pathoutage/PathOutageStatusProviderIT.java

  Log Message:
  -----------
  Merge pull request #8629 from OpenNMS/mm/NMS-19971-smoke

NMS-19971: Foreign Key with ON DELETE SET NULL for node.nodeparentid


  Commit: 0dd2a4c32f460b04563477141d123fbbf09bf909
      https://github.com/OpenNMS/opennms/commit/0dd2a4c32f460b04563477141d123fbbf09bf909
  Author: CI/CD System <[email protected]>
  Date:   2026-07-14 (Tue, 14 Jul 2026)

  Changed paths:
    A core/schema/src/main/liquibase/36.0.3/changelog.xml
    M core/schema/src/main/liquibase/changelog.xml
    M features/topology-map/plugins/org.opennms.features.topology.plugins.topo.pathoutage/src/test/java/org/opennms/features/topology/plugins/topo/pathoutage/PathOutageStatusProviderIT.java

  Log Message:
  -----------
  Merge remote-tracking branch 'origin/release-36.x' into develop


Compare: https://github.com/OpenNMS/opennms/compare/d1b56a63dcc7...0dd2a4c32f46

To unsubscribe from these emails, change your notification settings at https://github.com/OpenNMS/opennms/settings/notifications


_______________________________________________
Please read the OpenNMS Mailing List FAQ:
http://www.opennms.org/wiki/index.php?page=MailingListFaq
opennms-cvs mailing list

To *unsubscribe* or change your subscription options, see the bottom of this page:
https://lists.sourceforge.net/lists/listinfo/opennms-cvs
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.