Loom compatibility
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 25/100
調査の方向性
Start by reviewing the repository’s synchronized blocks and methods, then check which can perform blocking operations and how JNI calls affect virtual thread pinning. The issue also points to OpenJDK’s virtual thread documentation and pgjdbc issue 1951 for context. Done means documenting Loom usage and performance implications, or identifying code changes that improve support; the issue does not specify a concrete test or implementation scope.
索引モデルが issue の本文から書いたものです。
説明
Wanted to check the status of this driver running with Loom (https://openjdk.org/projects/loom/).
As far as I understand, jdbc can generally benefit from running on virtual threads instead of actually blocking threads. So, I thought this would be useful for this jdbc driver, but I have not found any discussion about loom or virtual threads in this repo.
There seem to be two things to look out for though, because they can lead to still blocking threads with loom. Taken from the openjdk docs on virtual threads (https://openjdk.org/jeps/425):
There are two scenarios in which a virtual thread cannot be unmounted during blocking operations because it is pinned to its carrier:
When it executes code inside a synchronized block or method, or
When it executes a native method or a foreign function.
Pinning does not make an application incorrect, but it might hinder its scalability. If a virtual thread performs a blocking operation such as I/O or BlockingQueue.take() while it is pinned, then its carrier and the underlying OS thread are blocked for the duration of the operation. Frequent pinning for long durations can harm the scalability of an application by capturing carriers.
Doing a quick search in the repo for synchronized, I can see a few occurrences:
https://github.com/search?q=repo%3Axerial%2Fsqlite-jdbc+synchronized+language%3AJava&type=code&l=Java
The question is probably, which one of the synchronized blocks or methods actually contain blocking code and whether we can change them to a ReentrantLock (as proposed).
Another question I have is: We obviously rely on JNI to call the sqlite3 C api and there is no way around it. So I am guessing, this will unavoidably lead to thread pinning. Does anyone know more about that?
Is your feature request related to a problem? Please describe.
The problem for me is currently to understand, whether using this jdbc driver with a virtual thread executor makes sense, and whether we can do things to improve support.
Describe the solution you'd like
I can see two results:
- documentation on usage with loom and whether it can have a benfit on performance
- check whether we can do something in the code to improve support
Describe alternatives you've considered
Additional context
Relevant efforts done in pgjdbc for postgres: https://github.com/pgjdbc/pgjdbc/issues/1951
- 主要言語
- Java
- スター
- 3.3k
- フォーク
- 676
- 平均マージ
- 1日 15時間
- マージ済み PR(30日)
- 18
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
xerial/sqlite-jdbc のほかの issue
-
triage
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
xerial/sqlite-jdbc#1515 ·
メンテナーはふだん 1 日以内に返信
-
triage
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
xerial/sqlite-jdbc#1514 ·
メンテナーはふだん 1 日以内に返信
-
triage
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
xerial/sqlite-jdbc#1513 ·
メンテナーはふだん 1 日以内に返信
-
triage
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
xerial/sqlite-jdbc#1512 ·
メンテナーはふだん 1 日以内に返信
-
SIGSEGV (exit 134) in bundled `rightstr()` when the length argument is a large negative number対応中かも @sarthakdev143-lite が 2 日前に担当しました。 オープンhelp wanted impacts:JNI
難易度 4/5 1〜2日 初心者へのやさしさ 38/100
xerial/sqlite-jdbc#1508 ·
メンテナーはふだん 1 日以内に返信
xerial/sqlite-jdbc の issue をすべて見る
似ている issue
-
vips-drift
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
Stirling-Tools/JPDFium#300 ·
メンテナーはふだん 1 日以内に返信
-
hermes-queue
難易度 1/5 1〜3時間 初心者へのやさしさ 85/100
chrisalunlloyd2-sudo/mindpalace#403 ·
メンテナーはふだん 1 日以内に返信
-
Guidelines: document how to build a use case against a local, unpublished Flow/browserless-test change対応中かも @totally-not-ai が今日担当しました。 オープン
難易度 1/5 1〜3時間 初心者へのやさしさ 88/100
vaadin/use-cases#452 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
area/storage area/storage/sql
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
Apicurio/apicurio-registry#11159 ·
メンテナーはふだん 1 日以内に返信
-
Area/Configuration Type/Improvement
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
ballerina-platform/static-code-analysis-tool#217 ·
メンテナーはふだん 1 日以内に返信