Skip to content

Commit bc028fd

Browse files
committed
Verify JDK Vector API is enabled on startup
Adds a runtime check to ensure the Vector API is enabled on the current JVM during system startup.
1 parent 8bec3ea commit bc028fd

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

core/trino-main/src/main/java/io/trino/server/TrinoSystemRequirements.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ private static void verifyJvmRequirements()
5353
verifyOsArchitecture();
5454
verifyByteOrder();
5555
verifyUsingG1Gc();
56+
verifyVectorApiEnabled();
5657
verifyUnixOperatingMBeans();
5758
verifyFileDescriptor();
5859
verifySlice();
@@ -129,6 +130,13 @@ private static void verifyUsingG1Gc()
129130
}
130131
}
131132

133+
private static void verifyVectorApiEnabled()
134+
{
135+
if (ModuleLayer.boot().findModule("jdk.incubator.vector").isEmpty()) {
136+
failRequirement("Trino requires the Vector API to be enabled/linked at runtime");
137+
}
138+
}
139+
132140
private static void verifyFileDescriptor()
133141
{
134142
long maxFileDescriptorCount = getMaxFileDescriptorCount();

0 commit comments

Comments
 (0)