[OpenNMS/opennms] dff6d6: NMS-20007: Make thresholding metadata scope creati...

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: dff6d640765adbaa6a14978bbaba7453795ae109
      https://github.com/OpenNMS/opennms/commit/dff6d640765adbaa6a14978bbaba7453795ae109
  Author: Marshall Massengill <[email protected]>
  Date:   2026-07-15 (Wed, 15 Jul 2026)

  Changed paths:
    A core/mate/api/src/main/java/org/opennms/core/mate/api/LazyScope.java
    A core/mate/api/src/test/java/org/opennms/core/mate/api/LazyScopeTest.java
    M features/collection/thresholding/impl/src/main/java/org/opennms/netmgt/threshd/ThresholdEntity.java
    M features/collection/thresholding/impl/src/main/java/org/opennms/netmgt/threshd/ThresholdingSetImpl.java
    M features/collection/thresholding/impl/src/main/java/org/opennms/netmgt/threshd/ThresholdingVisitorImpl.java

  Log Message:
  -----------
  NMS-20007: Make thresholding metadata scope creation lazy and shared per collection set

Since NMS-16966, applyThresholds/passedThresholdFilters/evaluateAndCreateEvents
each eagerly built an entity scope (3 read-only DB transactions loading the
node, interface and service entity graphs) per collection resource and per
threshold entity, on every collection cycle - even when no threshold definition
contains a metadata expression. On interface-heavy systems this produces tens
of thousands of database transactions per second (SUPPORT-3261).

Two changes:

1. Introduce LazyScope, a memoizing Scope wrapper, and build thresholding
   scopes lazily. Interpolation only consults a scope when the input contains
   an actual ${} expression, so configurations without metadata expressions
   now perform zero database work in the thresholding path.

2. Share one scope across the whole collection set. The scope only depends on
   session-level state (node id, host address, service name), never on the
   individual resource, so ThresholdingVisitorImpl builds a single lazy scope
   per visit. Configurations that do use metadata expressions go from one
   scope build per resource per threshold entity to at most one per service
   per collection cycle.


  Commit: 0c8a83a6e4dd0dd9c4b33fcddba9185a3d68104c
      https://github.com/OpenNMS/opennms/commit/0c8a83a6e4dd0dd9c4b33fcddba9185a3d68104c
  Author: Marshall Massengill <[email protected]>
  Date:   2026-07-15 (Wed, 15 Jul 2026)

  Changed paths:
    M core/mate/api/src/main/java/org/opennms/core/mate/api/LazyScope.java

  Log Message:
  -----------
  NMS-20007: Fail with a clear message if a lazy scope supplier returns null

Addresses Copilot review feedback: split the eager null check on the
supplier from the memoization, and name the failure when a supplier
produces a null scope at materialization time.


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

  Changed paths:
    M core/ipc/rpc/camel/src/main/java/org/opennms/core/rpc/camel/CamelRpcClientFactory.java
    R core/ipc/rpc/camel/src/test/java/org/opennms/core/rpc/camel/LocalRpcTimeoutTest.java

  Log Message:
  -----------
  NMS-20006: revert NMS-19951 local RPC TTL bound (PR #8604)

Reverts the change from PR #8604 (NMS-19951) that bounded local
(same-location) RPC execution with .orTimeout(TTL / default RPC
timeout). Local execution once again returns module.execute(request)
directly, and the LocalRpcTimeoutTest added by that PR is removed.

This restores the code in core/ipc/rpc/camel/CamelRpcClientFactory.java
byte-for-byte to its pre-PR state.


  Commit: 405869ca096148c6f6c0c1441a34d3436e013f11
      https://github.com/OpenNMS/opennms/commit/405869ca096148c6f6c0c1441a34d3436e013f11
  Author: Dino <[email protected]>
  Date:   2026-07-15 (Wed, 15 Jul 2026)

  Changed paths:
    M container/features/src/main/resources/features.xml
    M pom.xml

  Log Message:
  -----------
  NMS-19978: ship stax2-api to satisfy aalto-xml's OSGi import in opennms-core-camel (#8624)


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

  Changed paths:
    M core/ipc/rpc/camel/src/main/java/org/opennms/core/rpc/camel/CamelRpcClientFactory.java
    R core/ipc/rpc/camel/src/test/java/org/opennms/core/rpc/camel/LocalRpcTimeoutTest.java

  Log Message:
  -----------
  Merge pull request #8635 from OpenNMS/mm/NMS-20006-smoke

NMS-20006: revert NMS-19951 local RPC TTL bound (PR #8604)


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

  Changed paths:
    A core/mate/api/src/main/java/org/opennms/core/mate/api/LazyScope.java
    A core/mate/api/src/test/java/org/opennms/core/mate/api/LazyScopeTest.java
    M features/collection/thresholding/impl/src/main/java/org/opennms/netmgt/threshd/ThresholdEntity.java
    M features/collection/thresholding/impl/src/main/java/org/opennms/netmgt/threshd/ThresholdingSetImpl.java
    M features/collection/thresholding/impl/src/main/java/org/opennms/netmgt/threshd/ThresholdingVisitorImpl.java

  Log Message:
  -----------
  Merge pull request #8631 from OpenNMS/mm/NMS-20007-smoke

NMS-20007: Thresholding builds metadata scopes per resource and per threshold


  Commit: 58fe97cbc3037340136408509e7b19a42cb1f87a
      https://github.com/OpenNMS/opennms/commit/58fe97cbc3037340136408509e7b19a42cb1f87a
  Author: CI/CD System <[email protected]>
  Date:   2026-07-16 (Thu, 16 Jul 2026)

  Changed paths:
    M core/ipc/rpc/camel/src/main/java/org/opennms/core/rpc/camel/CamelRpcClientFactory.java
    R core/ipc/rpc/camel/src/test/java/org/opennms/core/rpc/camel/LocalRpcTimeoutTest.java
    A core/mate/api/src/main/java/org/opennms/core/mate/api/LazyScope.java
    A core/mate/api/src/test/java/org/opennms/core/mate/api/LazyScopeTest.java
    M features/collection/thresholding/impl/src/main/java/org/opennms/netmgt/threshd/ThresholdEntity.java
    M features/collection/thresholding/impl/src/main/java/org/opennms/netmgt/threshd/ThresholdingSetImpl.java
    M features/collection/thresholding/impl/src/main/java/org/opennms/netmgt/threshd/ThresholdingVisitorImpl.java

  Log Message:
  -----------
  Merge remote-tracking branch 'origin/foundation-2024' into foundation-2025


  Commit: 0277892a040c6c4cd083d9076490292fcee2b59a
      https://github.com/OpenNMS/opennms/commit/0277892a040c6c4cd083d9076490292fcee2b59a
  Author: CI/CD System <[email protected]>
  Date:   2026-07-17 (Fri, 17 Jul 2026)

  Changed paths:
    M core/ipc/rpc/camel/src/main/java/org/opennms/core/rpc/camel/CamelRpcClientFactory.java
    R core/ipc/rpc/camel/src/test/java/org/opennms/core/rpc/camel/LocalRpcTimeoutTest.java
    A core/mate/api/src/main/java/org/opennms/core/mate/api/LazyScope.java
    A core/mate/api/src/test/java/org/opennms/core/mate/api/LazyScopeTest.java
    M features/collection/thresholding/impl/src/main/java/org/opennms/netmgt/threshd/ThresholdEntity.java
    M features/collection/thresholding/impl/src/main/java/org/opennms/netmgt/threshd/ThresholdingSetImpl.java
    M features/collection/thresholding/impl/src/main/java/org/opennms/netmgt/threshd/ThresholdingVisitorImpl.java

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


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

  Changed paths:
    M core/ipc/rpc/camel/src/main/java/org/opennms/core/rpc/camel/CamelRpcClientFactory.java
    R core/ipc/rpc/camel/src/test/java/org/opennms/core/rpc/camel/LocalRpcTimeoutTest.java
    A core/mate/api/src/main/java/org/opennms/core/mate/api/LazyScope.java
    A core/mate/api/src/test/java/org/opennms/core/mate/api/LazyScopeTest.java
    M features/collection/thresholding/impl/src/main/java/org/opennms/netmgt/threshd/ThresholdEntity.java
    M features/collection/thresholding/impl/src/main/java/org/opennms/netmgt/threshd/ThresholdingSetImpl.java
    M features/collection/thresholding/impl/src/main/java/org/opennms/netmgt/threshd/ThresholdingVisitorImpl.java

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


Compare: https://github.com/OpenNMS/opennms/compare/755d75a58196...e605dd7613b5

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.