You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@bookkeeper.apache.org by "horizonzy (via GitHub)" <gi...@apache.org> on 2023/03/02 09:46:22 UTC

[GitHub] [bookkeeper] horizonzy commented on a diff in pull request #3832: [fix] Check the library in advance to avoid program exit without using NativeIO

horizonzy commented on code in PR #3832:
URL: https://github.com/apache/bookkeeper/pull/3832#discussion_r1122836076


##########
bookkeeper-server/src/main/java/org/apache/bookkeeper/util/PageCacheUtil.java:
##########
@@ -34,22 +36,39 @@ public final class PageCacheUtil {
 
     private static final int POSIX_FADV_DONTNEED = 4; /* fadvise.h */
 
-    private static boolean fadvisePossible = true;
+    private static boolean fadvisePossible = false;
 
     private static final NativeIO NATIVE_IO;
 
     static {
         NativeIO nativeIO = null;
         try {
+            if (SystemUtils.IS_OS_MAC_OSX) {

Review Comment:
   Moving the check logic in NativeIOImpl construction will be better. The NativeIOImpl is strongly bound with lib.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@bookkeeper.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org