RFR: 8354024: [JMH] Create ephemeral UnixDomainSocketAddress provider with thread-safe close semantics [v2]
Volkan Yazici
vyazici at openjdk.org
Mon May 12 11:26:30 UTC 2025
On Mon, 12 May 2025 07:41:01 GMT, Volkan Yazici <vyazici at openjdk.org> wrote:
>> What about just doing `bind(null)`? This will create all the socket files with unique names in the system temp directory. Since no sub-directory is being created, there can't be a race trying to delete it.
>>
>> Or maybe this is what the test was doing originally and it ran into some other problem?
>
> I thought `bind(null)` was not an option, since all UDS-involving benchmarks were designed with explicit file paths. Though upon closer look, I don't see any reason why those can't simply be replaced with `bind(null)` – implemented in 0b33d9321dd. Thanks to your suggestion, now this PR brings even a healthier diet:
>
>
> 2 files changed, 15 insertions(+), 54 deletions(-)
Tipped by @dfuch that `bind(null)` was probably avoided to not pollute `/tmp`. Per his suggestion, sticked to using `bind(null)`, though improved how we obtain the UDS file path in ffd31a462e.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/24568#discussion_r2084462994
More information about the net-dev
mailing list