You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Stefan Miklosovic (Jira)" <ji...@apache.org> on 2024/02/20 18:47:00 UTC

[jira] [Commented] (CASSANDRA-19416) fix "if" condition for mx4j tool in cassandra-env.sh

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

Stefan Miklosovic commented on CASSANDRA-19416:
-----------------------------------------------

[~brandon.williams] is it necessary to provide build for all branches back to 4.0? I think it is super straightforward patch and might be just merged as is.

> fix "if" condition for mx4j tool in cassandra-env.sh
> ----------------------------------------------------
>
>                 Key: CASSANDRA-19416
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-19416
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Legacy/Tools
>            Reporter: Stefan Miklosovic
>            Assignee: Stefan Miklosovic
>            Priority: Normal
>             Fix For: 4.0.x, 4.1.x, 5.0.x, 5.x
>
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> There is this in cassandra-env.sh
> {code}
> if [[ "$MX4J_ADDRESS" == \-Dmx4jaddress* ]]; then
> {code}
> (similar for port)
> This is wrong for /bin/sh shell (our shebang in bin/cassandra) and this does not work, probably in bash only, because /bin/sh does not understand what "[[" is nor it understand what "==" is.
> The reason this was never detected so far is that the logic will never come there when MX4J_ADDRESS and / or MX4J_PORT is commented out couple lines above.



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

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