From c7153838ec332d474c32b464b94f99382028bbbc Mon Sep 17 00:00:00 2001 From: Divy Srivastava Date: Tue, 15 Oct 2024 14:47:12 +0530 Subject: fix(ext/node): implement TCP.setNoDelay (#26263) Fixes https://github.com/denoland/deno/issues/26177 The significant delay was caused by Nagel's algorithm + delayed ACKs in Linux kernels. Here's the [kernel patch](https://lwn.net/Articles/502585/) which added 40ms `tcp_default_delack_min` ``` $ deno run -A pg-bench.mjs # main Tue Oct 15 2024 12:27:22 GMT+0530 (India Standard Time): 42ms $ target/release/deno run -A pg-bench.mjs # this patch Tue Oct 15 2024 12:28:02 GMT+0530 (India Standard Time): 1ms ``` ```js import { Buffer } from "node:buffer"; import pg from 'pg' const { Client } = pg const client = new Client({ connectionString: 'postgresql://postgres:postgres@127.0.0.1:5432/postgres' }) await client.connect() async function fetch() { const startPerf = performance.now(); const res = await client.query(`select $1::int as int, $2 as string, $3::timestamp with time zone as timestamp, $4 as null, $5::bool as boolean, $6::bytea as bytea, $7::jsonb as json `, [ 1337, 'wat', new Date().toISOString(), null, false, Buffer.from('awesome'), JSON.stringify([{ some: 'json' }, { array: 'object' }]) ]) console.log(`${new Date()}: ${Math.round(performance.now() - startPerf)}ms`) } for(;;) await fetch(); ``` --- tests/node_compat/runner/TODO.md | 1 - 1 file changed, 1 deletion(-) (limited to 'tests/node_compat/runner') diff --git a/tests/node_compat/runner/TODO.md b/tests/node_compat/runner/TODO.md index 99258f5a5..11b5d2805 100644 --- a/tests/node_compat/runner/TODO.md +++ b/tests/node_compat/runner/TODO.md @@ -1851,7 +1851,6 @@ NOTE: This file should not be manually edited. Please edit `tests/node_compat/co - [parallel/test-net-socket-ready-without-cb.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-net-socket-ready-without-cb.js) - [parallel/test-net-socket-reset-send.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-net-socket-reset-send.js) - [parallel/test-net-socket-reset-twice.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-net-socket-reset-twice.js) -- [parallel/test-net-socket-setnodelay.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-net-socket-setnodelay.js) - [parallel/test-net-socket-timeout-unref.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-net-socket-timeout-unref.js) - [parallel/test-net-socket-timeout.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-net-socket-timeout.js) - [parallel/test-net-socket-write-after-close.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-net-socket-write-after-close.js) -- cgit v1.2.3 From 4e38fbd0a3e0ca139314e503494a8d4795007d8a Mon Sep 17 00:00:00 2001 From: snek Date: Mon, 28 Oct 2024 18:16:43 +0100 Subject: fix: report exceptions from nextTick (#26579) Fixes: https://github.com/denoland/deno/issues/24713 Fixes: https://github.com/denoland/deno/issues/25855 --- tests/node_compat/runner/TODO.md | 1 - 1 file changed, 1 deletion(-) (limited to 'tests/node_compat/runner') diff --git a/tests/node_compat/runner/TODO.md b/tests/node_compat/runner/TODO.md index 11b5d2805..35a67e72d 100644 --- a/tests/node_compat/runner/TODO.md +++ b/tests/node_compat/runner/TODO.md @@ -280,7 +280,6 @@ NOTE: This file should not be manually edited. Please edit `tests/node_compat/co - [parallel/test-child-process-fork3.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-child-process-fork3.js) - [parallel/test-child-process-http-socket-leak.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-child-process-http-socket-leak.js) - [parallel/test-child-process-internal.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-child-process-internal.js) -- [parallel/test-child-process-ipc-next-tick.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-child-process-ipc-next-tick.js) - [parallel/test-child-process-ipc.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-child-process-ipc.js) - [parallel/test-child-process-no-deprecation.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-child-process-no-deprecation.js) - [parallel/test-child-process-pipe-dataflow.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-child-process-pipe-dataflow.js) -- cgit v1.2.3 From 6c6bbeb97495e8c3e8eac7bea27bf836f02b575f Mon Sep 17 00:00:00 2001 From: Nathan Whitaker <17734409+nathanwhit@users.noreply.github.com> Date: Thu, 31 Oct 2024 22:18:33 -0700 Subject: fix(node): Implement `os.userInfo` properly, add missing `toPrimitive` (#24702) Fixes the implementation of `os.userInfo`, and adds a missing `toPrimitive` for `tmpdir`. This allows us to enable the corresponding node_compat test. --- tests/node_compat/runner/TODO.md | 1 - 1 file changed, 1 deletion(-) (limited to 'tests/node_compat/runner') diff --git a/tests/node_compat/runner/TODO.md b/tests/node_compat/runner/TODO.md index 35a67e72d..231a4f62c 100644 --- a/tests/node_compat/runner/TODO.md +++ b/tests/node_compat/runner/TODO.md @@ -1878,7 +1878,6 @@ NOTE: This file should not be manually edited. Please edit `tests/node_compat/co - [parallel/test-os-homedir-no-envvar.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-os-homedir-no-envvar.js) - [parallel/test-os-process-priority.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-os-process-priority.js) - [parallel/test-os-userinfo-handles-getter-errors.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-os-userinfo-handles-getter-errors.js) -- [parallel/test-os.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-os.js) - [parallel/test-path-posix-relative-on-windows.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-path-posix-relative-on-windows.js) - [parallel/test-pending-deprecation.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-pending-deprecation.js) - [parallel/test-perf-gc-crash.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-perf-gc-crash.js) -- cgit v1.2.3 From c3c2b379669b17e5fdcbe5e62662404ca22c71c6 Mon Sep 17 00:00:00 2001 From: Yoshiya Hinosawa Date: Tue, 12 Nov 2024 19:54:47 +0900 Subject: fix(ext/node): add autoSelectFamily option to net.createConnection (#26661) --- tests/node_compat/runner/TODO.md | 1 - 1 file changed, 1 deletion(-) (limited to 'tests/node_compat/runner') diff --git a/tests/node_compat/runner/TODO.md b/tests/node_compat/runner/TODO.md index 231a4f62c..27c2ef3e7 100644 --- a/tests/node_compat/runner/TODO.md +++ b/tests/node_compat/runner/TODO.md @@ -1767,7 +1767,6 @@ NOTE: This file should not be manually edited. Please edit `tests/node_compat/co - [parallel/test-net-autoselectfamily-commandline-option.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-net-autoselectfamily-commandline-option.js) - [parallel/test-net-autoselectfamily-default.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-net-autoselectfamily-default.js) - [parallel/test-net-autoselectfamily-ipv4first.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-net-autoselectfamily-ipv4first.js) -- [parallel/test-net-autoselectfamily.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-net-autoselectfamily.js) - [parallel/test-net-better-error-messages-listen.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-net-better-error-messages-listen.js) - [parallel/test-net-binary.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-net-binary.js) - [parallel/test-net-bind-twice.js](https://github.com/nodejs/node/tree/v18.12.1/test/parallel/test-net-bind-twice.js) -- cgit v1.2.3 From 3ba464dbc40dd2d6bd3f7a1912aa8f0fad95058f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Iwa=C5=84czuk?= Date: Mon, 18 Nov 2024 19:27:44 +0000 Subject: chore: temporarily disable dns tests for Node compat (#26915) These tests are hitting a remote server which sometimes starts failing randomly on CI. They need to be rewritten to use a local server and have `/etc/hosts` setup that remaps relevants URLs. --- tests/node_compat/runner/TODO.md | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'tests/node_compat/runner') diff --git a/tests/node_compat/runner/TODO.md b/tests/node_compat/runner/TODO.md index 27c2ef3e7..cb7e6034b 100644 --- a/tests/node_compat/runner/TODO.md +++ b/tests/node_compat/runner/TODO.md @@ -105,9 +105,13 @@ NOTE: This file should not be manually edited. Please edit `tests/node_compat/co - [internet/test-dgram-multicast-set-interface-lo.js](https://github.com/nodejs/node/tree/v18.12.1/test/internet/test-dgram-multicast-set-interface-lo.js) - [internet/test-dgram-multicast-ssm-multi-process.js](https://github.com/nodejs/node/tree/v18.12.1/test/internet/test-dgram-multicast-ssm-multi-process.js) - [internet/test-dgram-multicast-ssmv6-multi-process.js](https://github.com/nodejs/node/tree/v18.12.1/test/internet/test-dgram-multicast-ssmv6-multi-process.js) +- [internet/test-dns-any.js](https://github.com/nodejs/node/tree/v18.12.1/test/internet/test-dns-any.js) - [internet/test-dns-cares-domains.js](https://github.com/nodejs/node/tree/v18.12.1/test/internet/test-dns-cares-domains.js) - [internet/test-dns-getDefaultResultOrder.js](https://github.com/nodejs/node/tree/v18.12.1/test/internet/test-dns-getDefaultResultOrder.js) +- [internet/test-dns-ipv4.js](https://github.com/nodejs/node/tree/v18.12.1/test/internet/test-dns-ipv4.js) +- [internet/test-dns-ipv6.js](https://github.com/nodejs/node/tree/v18.12.1/test/internet/test-dns-ipv6.js) - [internet/test-dns-txt-sigsegv.js](https://github.com/nodejs/node/tree/v18.12.1/test/internet/test-dns-txt-sigsegv.js) +- [internet/test-dns.js](https://github.com/nodejs/node/tree/v18.12.1/test/internet/test-dns.js) - [internet/test-http-dns-fail.js](https://github.com/nodejs/node/tree/v18.12.1/test/internet/test-http-dns-fail.js) - [internet/test-http2-issue-32922.js](https://github.com/nodejs/node/tree/v18.12.1/test/internet/test-http2-issue-32922.js) - [internet/test-https-autoselectfamily-slow-timeout.js](https://github.com/nodejs/node/tree/v18.12.1/test/internet/test-https-autoselectfamily-slow-timeout.js) -- cgit v1.2.3