Skip to content

fix:Fix the failure of uploading node indicator probabilities.#3054

Merged
ply0011 merged 1 commit intodevelopfrom
fix-TAP-10040-develop
Feb 28, 2026
Merged

fix:Fix the failure of uploading node indicator probabilities.#3054
ply0011 merged 1 commit intodevelopfrom
fix-TAP-10040-develop

Conversation

@weiliang110100
Copy link
Copy Markdown
Contributor

No description provided.

@augmentcode
Copy link
Copy Markdown

augmentcode bot commented Feb 28, 2026

🤖 Augment PR Summary

Summary: Fixes observable-metrics upload failures by ensuring node/table/processor sample-handler registries are always initialized and safe to access concurrently.

Changes: Initializes handler maps as final ConcurrentHashMap instances, removes lazy new HashMap() initialization blocks, and simplifies onStop cleanup to close handlers directly.

Why: Prevents missing handler registration / null-map access when aspects fire before map initialization.

Technical Notes: ConcurrentHashMap rejects null keys/values, so any call sites using a potentially-null key must be guarded.

🤖 Was this summary useful? React with 👍 or 👎

Copy link
Copy Markdown

@augmentcode augmentcode bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review completed. 1 suggestions posted.

Fix All in Augment

Comment augment review to trigger a new review at any time.

private Map<String, TableSampleHandler> tableSampleHandlers;
private Map<String, DataNodeSampleHandler> dataNodeSampleHandlers;
private Map<String, ProcessorNodeSampleHandler> processorNodeSampleHandlers;
private final Map<String, TableSampleHandler> tableSampleHandlers = new ConcurrentHashMap<>();
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Switching these handler registries to ConcurrentHashMap means null keys/values will now throw NPE. In handleWriteRecordFunc, targetTableName can be null (HashBiMap.create(...).inverse().get(table) miss) and is passed to containsKey/get, which would now crash and differs from prior HashMap behavior.

Severity: medium

Other Locations
  • iengine/modules/observable-module/src/main/java/io/tapdata/observable/metric/ObservableAspectTask.java:507

Fix This in Augment

🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage.

@ply0011 ply0011 merged commit 4dbe3fd into develop Feb 28, 2026
22 of 24 checks passed
@ply0011 ply0011 deleted the fix-TAP-10040-develop branch February 28, 2026 08:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants