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

[GitHub] [bookkeeper] wenbingshen opened a new pull request, #3832: [fix] Check the library in advance to avoid program exit without using NativeIO

wenbingshen opened a new pull request, #3832:
URL: https://github.com/apache/bookkeeper/pull/3832

   ### Motivation
   
   Related to this PR: https://github.com/apache/bookkeeper/pull/3824
   
   We should check whether the corresponding library is exist in advance, otherwise an error will be reported without using NativeIO.
   


-- 
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


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

Posted by "horizonzy (via GitHub)" <gi...@apache.org>.
horizonzy commented on PR #3832:
URL: https://github.com/apache/bookkeeper/pull/3832#issuecomment-1453256809

   It can be closed. Catching the throwable will cover the exception(`java.lang.ExceptionInInitializerError`).


-- 
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


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

Posted by "wenbingshen (via GitHub)" <gi...@apache.org>.
wenbingshen commented on PR #3832:
URL: https://github.com/apache/bookkeeper/pull/3832#issuecomment-1451478468

   rerun failure checks


-- 
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


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

Posted by "horizonzy (via GitHub)" <gi...@apache.org>.
horizonzy commented on PR #3832:
URL: https://github.com/apache/bookkeeper/pull/3832#issuecomment-1453276805

   Matteo will fix it.


-- 
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


[GitHub] [bookkeeper] wenbingshen closed pull request #3832: [fix] Check the library in advance to avoid program exit without using NativeIO

Posted by "wenbingshen (via GitHub)" <gi...@apache.org>.
wenbingshen closed pull request #3832: [fix] Check the library in advance to avoid program exit without using NativeIO
URL: https://github.com/apache/bookkeeper/pull/3832


-- 
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


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

Posted by "wenbingshen (via GitHub)" <gi...@apache.org>.
wenbingshen commented on PR #3832:
URL: https://github.com/apache/bookkeeper/pull/3832#issuecomment-1453274411

   > It can be closed. Catching the throwable will cover the exception(`java.lang.ExceptionInInitializerError`).
   
   @horizonzy Good catch. Your method looks better. I didn't notice this detail yesterday. You can submit a PR to fix it and I will close this PR. :)


-- 
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


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

Posted by "horizonzy (via GitHub)" <gi...@apache.org>.
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