[ 
https://issues.apache.org/jira/browse/CASSANDRA-16565?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17779464#comment-17779464
 ] 

Claude Warren commented on CASSANDRA-16565:
-------------------------------------------

I have submitted a  pull request https://github.com/apache/cassandra/pull/2842 
that achieves the following:

Removed Sigar references from the build scripts and library.
Removed SigarLibrary.java and replaced it with SystemInfo.java and updated the 
calls.

Switched to [OSHI library|https://github.com/oshi/oshi]

Due to the differences between the Sigar library and the OSHI library some 
changes in the "warnIfRunningInDegradedMode" method were necessary.

 

There is no OSHI support for determining the maximum number of processes 
allowed.  However, all modern Linuxes have a "/proc/PID/limits" file.  The 
SystemInfo.warnIfRunningInDegradedMode method will parse that file on a Linux 
box and if not on a Linux box will return the default number of PIDs for Linux 
(1024).  We should not return 0 as that is obviously wrong since at least 1 
process is running,  We can not return -1 because that is the historical value 
of UNLIMITED, or INFINITY as it was called in the SigarLibrary.  

Since we only officially support Linux and the number of processes is probably 
wrong for other cases, the check now declares a degraded mode if the system is 
anything but Linux (yes, Mac OS will now report running in degraded mode).  But 
since this is a warning and developers know to expect it there should not be a 
problem.

The logging message now indicates what values are expected when the value is 
not met.

 

> Remove dependency on sigar
> --------------------------
>
>                 Key: CASSANDRA-16565
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-16565
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Build
>            Reporter: David Capwell
>            Assignee: Claude Warren
>            Priority: Normal
>             Fix For: 5.x
>
>
> sigar is used to check if the environment has good settings for running C*, 
> but requires we bundle a lot of native libraries to perform this check (which 
> can also be done elsewhere).  This project also appears to be dead as the 
> last commit was around 6 years ago.
> With the move to resolve artifacts rather than commit them, removing this 
> dependency would remove majority of the artifacts fetched from GitHub.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org

Reply via email to