Skip to content

Node v22.22.2 nsolid v6.2.3 release#452

Open
santigimeno wants to merge 7 commits intonode-v22.x-nsolid-v6.xfrom
node-v22.22.2-nsolid-v6.2.3-release
Open

Node v22.22.2 nsolid v6.2.3 release#452
santigimeno wants to merge 7 commits intonode-v22.x-nsolid-v6.xfrom
node-v22.22.2-nsolid-v6.2.3-release

Conversation

@santigimeno
Copy link
Copy Markdown
Member

No description provided.

Replace blocked and unblocked loop hook entries when the same callback
is registered again.

These hooks were stored in append-only TSList containers, so dynamic
reconfiguration in agents like gRPC and ZMQ kept stale registrations
alive. That caused duplicate callback delivery and let old blocked loop
thresholds continue affecting detection.

Add TSList::replace_if() and use it in blocked and unblocked loop
hook registration. When the callback function pointer matches an
existing entry, overwrite it instead of appending a new one.

For blocked loop hooks, recompute min_blocked_threshold_ after each
registration so a replaced threshold immediately becomes effective.

PR-URL: #444
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: EHortua <55801532+EHortua@users.noreply.github.com>
Keep JS tracing decisions tied to the env-local tracing state
materialized by the native toggle path instead of rereading live flags
in multiple places.

Tracing flags can be updated from any thread, so reading them directly
during span creation can observe a mid-flight toggle. That could make
Tracer.startSpan() return a NonRecordingSpan after the caller had
already passed an internal tracing gate, leading to crashes like
TypeError: span._pushSpanDataString is not a function.

Pass the full tracing bitmask from EnvList::update_tracing_flags() into
JS, cache it in lib/internal/nsolid_trace.js, and make the internal
OTel code consume that cached per-thread state. This removes the
split-brain behavior where callback binding/unbinding followed
flagsUpdated but Tracer.startSpan() could independently observe a later
disable and return a NonRecordingSpan.

For internal spans, stop Tracer.startSpan() from rechecking the current
trace flags after the caller has already crossed an internal tracing
gate. That keeps internal span creation locally consistent while
tracing is being enabled and disabled and avoids crashes in code paths
that expect a real N|Solid span object.

Also add targeted repro coverage for the toggle race:
- extend the tracing test addon with configurable setupTracing(flags),
  stopTracing(), and skipExpectedTracesCheck()
- add a deterministic fetch-based repro that toggles HTTP client
  tracing while concurrent fetch() traffic is in flight
- add a grpc-based repro harness for tracing reconfiguration and cover
  both fetch and http traffic
- teach the grpc agent test client how to generate fetch transactions

Together these changes make trace flags materialize per env/thread in
JS, preserve the caller's local tracing decision for internal spans,
and add regression coverage for the tracing enable/disable race.

PR-URL: #441
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
PR-URL: #441
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
@santigimeno santigimeno self-assigned this Apr 20, 2026
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 20, 2026

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 8da6435b-06c5-4ed2-8e2c-2f2b9f634ebf

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch node-v22.22.2-nsolid-v6.2.3-release

Comment @coderabbitai help to get the list of available commands and usage tips.

@santigimeno santigimeno force-pushed the node-v22.22.2-nsolid-v6.2.3-release branch from a474c46 to f7753da Compare April 22, 2026 15:37
@santigimeno santigimeno force-pushed the node-v22.22.2-nsolid-v6.2.3-release branch from f7753da to b8dafe8 Compare April 22, 2026 22:05
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.

1 participant