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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to