Live data from Hacker News

We switched to Java 21 virtual threads and got a deadlock in TPC-C for Postgres

blog.ydb.tech

161–170 of 253 posts

Re: We switched to Java 21 virtual threads and got a deadlock in TPC-C for Postgres

#161
post #40

Earlier quoted context omitted.

Interestingly enough, I love both mutual-TLS and OAUTH (especially OIDC).

Why is that interesting?

Because the same type of people is interested in both things.

Re: We switched to Java 21 virtual threads and got a deadlock in TPC-C for Postgres

#162
post #73

Earlier quoted context omitted.

Sorry, the first sentence is a mis-informing wording. The `synchronized` pins the thread only when from within of the `synchronized` the program calls a blocking operation that would normally unmount the virtual thread, like blockingQueue.take() or similar. (Which is not a sane coding practice). It's because the unmounting, as it's implemented today, does not work well with synchronized. It's better if people read JE…

By long running I just meant anything that was not fast compute. I was more focused on finding the reference link so I agree my wording wasn’t clear. Go started without preemption and added it later. The Java team has indicated a similar path, so we might see that tackled in the future. I think they could do that using safe points or JEP 312‘s handshakes, so it’s not infeasible. For file io they wanted to explore io_…

[deleted]

Re: We switched to Java 21 virtual threads and got a deadlock in TPC-C for Postgres

#164

Totally off topic but I am getting tired of the AI generated images used on nearly all blog posts nowadays. They are instantly recognisable, it just seems low effort and lowers the feeling of quality one might otherwise have

Interesting. Now that you mention it, there are illustrations there. But I'm pretty sure I subconsciously scrolled past them to get to the rest of the article without consciously noticing them on the first read.

Generated or hand drawn, they're kinda a wasted effort on a technical post.

Re: We switched to Java 21 virtual threads and got a deadlock in TPC-C for Postgres

#165
post #113
post #69

Earlier quoted context omitted.

There are many other implementations, although in less popular languages. The trick is to include the green threads from the start, so there are no libraries that depend on real threading. That's why Go and Erlang are so successful.

The funny thing is that Java did have green threads back in v1.1, but they were dropped in v1.3. That doesn't invalidate your point; more than 20 years of Java practice has focused on making things work well for platform threads.

I think Solaris moved from green threads to pure kernel threads at the same time (https://docs.oracle.com/cd/E19253-01/816-5137/mtintro-75924/... says Solaris 9 was the transition point).

Re: We switched to Java 21 virtual threads and got a deadlock in TPC-C for Postgres

#167

Totally off topic but I am getting tired of the AI generated images used on nearly all blog posts nowadays. They are instantly recognisable, it just seems low effort and lowers the feeling of quality one might otherwise have

I just don't really understand the value they're supposed to bring. If everyone uses the same looking generates images it just makes all the blogs look the same again. Then the thing is, they usually have nothing to do with the actual article. So why not just leave them out and not waste space.

All the SaaS sites featured on HN now and then also look the same :)

Re: We switched to Java 21 virtual threads and got a deadlock in TPC-C for Postgres

#168

Earlier quoted context omitted.

My long held belief: green/user-level/M:N threading schemes never work at first, and only work reliably after extreme effort has been put into fixing all the cases where blocking code gets called underneath. afaik there are only two modern working implementations: golang and erlang. This article is consistent with that belief.

It works well enough in Python and NodeJS.

That’s M-on-N, with N being 1. That’s basically a trivial problem in comparison.

Re: We switched to Java 21 virtual threads and got a deadlock in TPC-C for Postgres

#169

Totally off topic but I am getting tired of the AI generated images used on nearly all blog posts nowadays. They are instantly recognisable, it just seems low effort and lowers the feeling of quality one might otherwise have

Interesting. Now that you mention it, there are illustrations there. But I'm pretty sure I subconsciously scrolled past them to get to the rest of the article without consciously noticing them on the first read. Generated or hand drawn, they're kinda a wasted effort on a technical post.

I also subconsciously scrolled past them. Anything unexpectedly colourful and so on just hits some sort of mental adblock for me now.
Post reply on HN