Advocate for `StandardOpenOption.DIRECT`

Offen
#190 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Maintainer antworten meist innerhalb von 1 Tag

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
1/5
Geschätzter Aufwand
Unter einer Stunde
Anfängerfreundlichkeit
35/100
Issue-Typ
Dokumentation
Klarheit
Klar beschrieben
Aktivitätsstatus
Ruhig
Tech-Stack
java
Bereich
performance, tooling

Rechercherichtung

This is advocacy, not a repo code change: open https://bugs.openjdk.org/browse/JDK-8264744, create an OpenJDK/JBS account if needed, and post the project's disk-benchmark use of uncached I/O (Linux O_DIRECT / Windows FILE_FLAG_NO_BUFFERING / macOS F_NOCACHE) and the current --add-exports java.base/com.sun.nio.file=ALL-UNNAMED workaround. Done when a comment with that usecase is on the JDK ticket; nothing in jdm-java needs a patch.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

enhancement

we currently use ExtendedOpenOption.DIRECT under com.sun.nio.file. This is essential for a disk benchmark to get real hardware throughput rather than cached reads. This mode has been around for 10years and is likely to continue being available.

open jdk's enhancement request:

https://bugs.openjdk.org/browse/JDK-8264744

to promote to standard option but no activity. we should endorese this request as we rely on it by creating an account and posting our usecase.

t's been sitting with no activity — direct I/O semantics vary significantly across OSes (Linux O_DIRECT, Windows FILE_FLAG_NO_BUFFERING, macOS F_NOCACHE) and the JDK team hasn't committed to a cross-platform contract

The com.sun.nio.file package is in a grey area — it's internal API but it's exported from the jdk.unsupported module

we can surpress with

<compilerArgs>
    <arg>--add-exports</arg>
    <arg>java.base/com.sun.nio.file=ALL-UNNAMED</arg>
</compilerArgs>

example of ci errors we get from this:

Image
Vorherrschende Sprache
Java
Sterne
6
Forks
6
Ø Merge
10 Std. 11 Min.
Gemergte PRs (30 T.)
12

Entwicklungsumgebung

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus JDiskMark/jdm-java

Alle Issues in JDiskMark/jdm-java

Ähnliche Issues

Weitere Issues zu Java

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.