fix:Fix the failure of uploading node indicator probabilities.#3054
fix:Fix the failure of uploading node indicator probabilities.#3054
Conversation
🤖 Augment PR SummarySummary: Fixes observable-metrics upload failures by ensuring node/table/processor sample-handler registries are always initialized and safe to access concurrently. 🤖 Was this summary useful? React with 👍 or 👎 |
| private Map<String, TableSampleHandler> tableSampleHandlers; | ||
| private Map<String, DataNodeSampleHandler> dataNodeSampleHandlers; | ||
| private Map<String, ProcessorNodeSampleHandler> processorNodeSampleHandlers; | ||
| private final Map<String, TableSampleHandler> tableSampleHandlers = new ConcurrentHashMap<>(); |
There was a problem hiding this comment.
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
🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage.
No description provided.