File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed
src/main/java/io/lettuce/core/resource Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change 11package io .lettuce .core .resource ;
22
33import io .lettuce .core .internal .LettuceAssert ;
4+ import io .micrometer .common .util .internal .logging .InternalLogger ;
5+ import io .micrometer .common .util .internal .logging .InternalLoggerFactory ;
46import io .netty .channel .Channel ;
57import io .netty .channel .EventLoopGroup ;
68import io .netty .channel .nio .NioEventLoopGroup ;
@@ -59,13 +61,18 @@ public static Class<? extends DatagramChannel> datagramChannelClass() {
5961 */
6062 public static class NativeTransports {
6163
64+ private static final InternalLogger transportsLogger = InternalLoggerFactory .getInstance (Transports .class );
65+
6266 static EventLoopResources RESOURCES = KqueueProvider .isAvailable () ? KqueueProvider .getResources ()
6367 : IOUringProvider .isAvailable () ? IOUringProvider .getResources () : EpollProvider .getResources ();
6468
6569 /**
6670 * @return {@code true} if a native transport is available.
6771 */
6872 static boolean isAvailable () {
73+ if (EpollProvider .isAvailable () && IOUringProvider .isAvailable ()) {
74+ transportsLogger .warn ("Both epoll and io_uring native transports are available, epoll has been prioritized." );
75+ }
6976 return EpollProvider .isAvailable () || KqueueProvider .isAvailable () || IOUringProvider .isAvailable ();
7077 }
7178
You can’t perform that action at this time.
0 commit comments