Repository navigation
core: fix empty array write memory leak && fix(driver): accept UINT64 write values for numeric tags - #2962
Conversation
Sparkplug B encodes UInt64 metrics as an unsigned 64-bit value, which cannot be represented by an INT64 write value. Accept NEU_TYPE_UINT64 writes for numeric tags, evaluate the range with the unsigned value, and extend cal_decimal and float conversion accordingly. INT64 write values keep their signed semantics.
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2962 +/- ##
===========================================
+ Coverage 54.07% 68.89% +14.82%
===========================================
Files 137 137
Lines 34649 34720 +71
===========================================
+ Hits 18736 23922 +5186
+ Misses 15913 10798 -5115 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 3b72cc7d74
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| req->groups[i].tags[k].t = v_elems[1].t; | ||
| req->groups[i].tags[k].value = v_elems[1].v; | ||
| if (req->groups[i].tags[k].t == NEU_JSON_OBJECT) { | ||
| json_incref(req->groups[i].tags[k].value.val_object); |
There was a problem hiding this comment.
Release retained custom values after decode failures
When an authenticated management caller (or a deployment with JWT disabled) sends /api/v2/write/gtags with a valid, large object value followed by a malformed tag or group, this json_incref has no matching decrement: the later failure branches in decode_write_gtags_req_json free only the tag/group arrays, neu_json_decode_write_gtags_req_json then frees only req, and the wrapper drops the root reference. The added reference can therefore retain nearly the 4 MiB request limit on every failed request, so repeated malformed writes can exhaust the gateway; release all previously retained object values on every partial-decode failure (or centralize that cleanup).
AGENTS.md reference: AGENTS.md:L26-L26
Useful? React with 👍 / 👎.
No description provided.