[jira] [Updated] (CASSANDRA-12660) NIODataInputStreamTest - Function with an infinite loop
[ https://issues.apache.org/jira/browse/CASSANDRA-12660?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Arunkumar M updated CASSANDRA-12660: Attachment: 12660-3.9.txt > NIODataInputStreamTest - Function with an infinite loop > --- > > Key: CASSANDRA-12660 > URL: https://issues.apache.org/jira/browse/CASSANDRA-12660 > Project: Cassandra > Issue Type: Bug > Components: Core >Reporter: Marianne Linhares Monteiro >Assignee: Arunkumar M >Priority: Trivial > Labels: easyfix, low-hanging-fruit > Fix For: 2.2.x, 3.0.x, 3.x, 4.x > > Attachments: 12660-3.9.txt, 12660-3.9.txt > > Original Estimate: 5m > Remaining Estimate: 5m > > Function with an infinite loop and not needed. > https://github.com/apache/cassandra/blob/trunk/test/unit/org/apache/cassandra/io/util/NIODataInputStreamTest.java > - lines 97-101 > isOpen() -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (CASSANDRA-12660) NIODataInputStreamTest - Function with an infinite loop
[ https://issues.apache.org/jira/browse/CASSANDRA-12660?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Arunkumar M updated CASSANDRA-12660: Attachment: (was: 12660-3.9.txt) > NIODataInputStreamTest - Function with an infinite loop > --- > > Key: CASSANDRA-12660 > URL: https://issues.apache.org/jira/browse/CASSANDRA-12660 > Project: Cassandra > Issue Type: Bug > Components: Core >Reporter: Marianne Linhares Monteiro >Assignee: Arunkumar M >Priority: Trivial > Labels: easyfix, low-hanging-fruit > Fix For: 2.2.x, 3.0.x, 3.x, 4.x > > Attachments: 12660-3.9.txt > > Original Estimate: 5m > Remaining Estimate: 5m > > Function with an infinite loop and not needed. > https://github.com/apache/cassandra/blob/trunk/test/unit/org/apache/cassandra/io/util/NIODataInputStreamTest.java > - lines 97-101 > isOpen() -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (CASSANDRA-12660) NIODataInputStreamTest - Function with an infinite loop
[ https://issues.apache.org/jira/browse/CASSANDRA-12660?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15598180#comment-15598180 ] Arunkumar M commented on CASSANDRA-12660: - Done, added an entry in CHANGES.txt and commit message. > NIODataInputStreamTest - Function with an infinite loop > --- > > Key: CASSANDRA-12660 > URL: https://issues.apache.org/jira/browse/CASSANDRA-12660 > Project: Cassandra > Issue Type: Bug > Components: Core >Reporter: Marianne Linhares Monteiro >Assignee: Arunkumar M >Priority: Trivial > Labels: easyfix, low-hanging-fruit > Fix For: 2.2.x, 3.0.x, 3.x, 4.x > > Attachments: 12660-3.9.txt, 12660-3.9.txt > > Original Estimate: 5m > Remaining Estimate: 5m > > Function with an infinite loop and not needed. > https://github.com/apache/cassandra/blob/trunk/test/unit/org/apache/cassandra/io/util/NIODataInputStreamTest.java > - lines 97-101 > isOpen() -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (CASSANDRA-12660) NIODataInputStreamTest - Function with an infinite loop
[ https://issues.apache.org/jira/browse/CASSANDRA-12660?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Arunkumar M updated CASSANDRA-12660: Since Version: 3.9 Status: Patch Available (was: Awaiting Feedback) > NIODataInputStreamTest - Function with an infinite loop > --- > > Key: CASSANDRA-12660 > URL: https://issues.apache.org/jira/browse/CASSANDRA-12660 > Project: Cassandra > Issue Type: Bug > Components: Core >Reporter: Marianne Linhares Monteiro >Assignee: Arunkumar M >Priority: Trivial > Labels: easyfix, low-hanging-fruit > Fix For: 2.2.x, 3.0.x, 3.x, 4.x > > Attachments: 12660-3.9.txt, 12660-3.9.txt > > Original Estimate: 5m > Remaining Estimate: 5m > > Function with an infinite loop and not needed. > https://github.com/apache/cassandra/blob/trunk/test/unit/org/apache/cassandra/io/util/NIODataInputStreamTest.java > - lines 97-101 > isOpen() -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (CASSANDRA-12660) NIODataInputStreamTest - Function with an infinite loop
[ https://issues.apache.org/jira/browse/CASSANDRA-12660?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Arunkumar M updated CASSANDRA-12660: Attachment: 12660-3.9.txt > NIODataInputStreamTest - Function with an infinite loop > --- > > Key: CASSANDRA-12660 > URL: https://issues.apache.org/jira/browse/CASSANDRA-12660 > Project: Cassandra > Issue Type: Bug > Components: Core >Reporter: Marianne Linhares Monteiro >Assignee: Arunkumar M >Priority: Trivial > Labels: easyfix, low-hanging-fruit > Fix For: 2.2.x, 3.0.x, 3.x, 4.x > > Attachments: 12660-3.9.txt, 12660-3.9.txt > > Original Estimate: 5m > Remaining Estimate: 5m > > Function with an infinite loop and not needed. > https://github.com/apache/cassandra/blob/trunk/test/unit/org/apache/cassandra/io/util/NIODataInputStreamTest.java > - lines 97-101 > isOpen() -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (CASSANDRA-12660) NIODataInputStreamTest - Function with an infinite loop
[ https://issues.apache.org/jira/browse/CASSANDRA-12660?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15508720#comment-15508720 ] Arunkumar M commented on CASSANDRA-12660: - Sure, attached another patch. > NIODataInputStreamTest - Function with an infinite loop > --- > > Key: CASSANDRA-12660 > URL: https://issues.apache.org/jira/browse/CASSANDRA-12660 > Project: Cassandra > Issue Type: Bug > Components: Core >Reporter: Marianne Linhares Monteiro >Assignee: Arunkumar M >Priority: Trivial > Labels: easyfix, low-hanging-fruit > Fix For: 3.9 > > Attachments: 12660-3.9.txt > > Original Estimate: 5m > Remaining Estimate: 5m > > Function with an infinite loop and not needed. > https://github.com/apache/cassandra/blob/trunk/test/unit/org/apache/cassandra/io/util/NIODataInputStreamTest.java > - lines 97-101 > isOpen() -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (CASSANDRA-12660) NIODataInputStreamTest - Function with an infinite loop
[ https://issues.apache.org/jira/browse/CASSANDRA-12660?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Arunkumar M updated CASSANDRA-12660: Attachment: 12660-3.9.txt > NIODataInputStreamTest - Function with an infinite loop > --- > > Key: CASSANDRA-12660 > URL: https://issues.apache.org/jira/browse/CASSANDRA-12660 > Project: Cassandra > Issue Type: Bug > Components: Core >Reporter: Marianne Linhares Monteiro >Assignee: Arunkumar M >Priority: Trivial > Labels: easyfix, low-hanging-fruit > Fix For: 3.9 > > Attachments: 12660-3.9.txt > > Original Estimate: 5m > Remaining Estimate: 5m > > Function with an infinite loop and not needed. > https://github.com/apache/cassandra/blob/trunk/test/unit/org/apache/cassandra/io/util/NIODataInputStreamTest.java > - lines 97-101 > isOpen() -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (CASSANDRA-12660) NIODataInputStreamTest - Function with an infinite loop
[ https://issues.apache.org/jira/browse/CASSANDRA-12660?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Arunkumar M updated CASSANDRA-12660: Attachment: (was: 12660-3.9.txt) > NIODataInputStreamTest - Function with an infinite loop > --- > > Key: CASSANDRA-12660 > URL: https://issues.apache.org/jira/browse/CASSANDRA-12660 > Project: Cassandra > Issue Type: Bug > Components: Core >Reporter: Marianne Linhares Monteiro >Assignee: Arunkumar M >Priority: Trivial > Labels: easyfix, low-hanging-fruit > Fix For: 3.9 > > Attachments: 12660-3.9.txt > > Original Estimate: 5m > Remaining Estimate: 5m > > Function with an infinite loop and not needed. > https://github.com/apache/cassandra/blob/trunk/test/unit/org/apache/cassandra/io/util/NIODataInputStreamTest.java > - lines 97-101 > isOpen() -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (CASSANDRA-12660) NIODataInputStreamTest - Function with infinite loop and not needed
[ https://issues.apache.org/jira/browse/CASSANDRA-12660?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Arunkumar M updated CASSANDRA-12660: Assignee: Arunkumar M Fix Version/s: (was: 3.7) 3.9 Reproduced In: 3.9 (was: 3.7) Status: Patch Available (was: Open) > NIODataInputStreamTest - Function with infinite loop and not needed > --- > > Key: CASSANDRA-12660 > URL: https://issues.apache.org/jira/browse/CASSANDRA-12660 > Project: Cassandra > Issue Type: Bug > Components: Core >Reporter: Marianne Linhares Monteiro >Assignee: Arunkumar M >Priority: Trivial > Labels: easyfix, low-hanging-fruit > Fix For: 3.9 > > Attachments: 12660-3.9.txt > > Original Estimate: 5m > Remaining Estimate: 5m > > Function with infinite loop and not needed. > https://github.com/apache/cassandra/blob/trunk/test/unit/org/apache/cassandra/io/util/NIODataInputStreamTest.java > - linhas 97-101 > isOpen() -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (CASSANDRA-12660) NIODataInputStreamTest - Function with infinite loop and not needed
[ https://issues.apache.org/jira/browse/CASSANDRA-12660?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Arunkumar M updated CASSANDRA-12660: Attachment: 12660-3.9.txt > NIODataInputStreamTest - Function with infinite loop and not needed > --- > > Key: CASSANDRA-12660 > URL: https://issues.apache.org/jira/browse/CASSANDRA-12660 > Project: Cassandra > Issue Type: Bug > Components: Core >Reporter: Marianne Linhares Monteiro >Priority: Trivial > Labels: easyfix, low-hanging-fruit > Fix For: 3.7 > > Attachments: 12660-3.9.txt > > Original Estimate: 5m > Remaining Estimate: 5m > > Function with infinite loop and not needed. > https://github.com/apache/cassandra/blob/trunk/test/unit/org/apache/cassandra/io/util/NIODataInputStreamTest.java > - linhas 97-101 > isOpen() -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (CASSANDRA-12573) SASI index. Incorrect results for '%foo%bar%'-like search pattern.
[ https://issues.apache.org/jira/browse/CASSANDRA-12573?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Arunkumar M updated CASSANDRA-12573: Assignee: (was: Arunkumar M) > SASI index. Incorrect results for '%foo%bar%'-like search pattern. > --- > > Key: CASSANDRA-12573 > URL: https://issues.apache.org/jira/browse/CASSANDRA-12573 > Project: Cassandra > Issue Type: Bug >Reporter: Mikhail Krupitskiy >Priority: Critical > > We use Cassandra 3.7 and have faced a strange behaviour of SELECT requests > with "LIKE '%foo%bar%'" constraints on a column with SASI index. > Below are few experiments that show this behaviour. > Experiment 1: > {noformat} > drop keyspace if exists kmv; > create keyspace if not exists kmv WITH REPLICATION = { 'class' : > 'SimpleStrategy', 'replication_factor':'1'} ; > use kmv; > CREATE TABLE if not exists kmv (id int primary key, c1 text, c2 text); > CREATE CUSTOM INDEX ON kmv.kmv ( c2 ) USING > 'org.apache.cassandra.index.sasi.SASIIndex' WITH OPTIONS = { > 'mode': 'CONTAINS' > }; > insert into kmv (id, c1, c2) values (1, 'f21', 'qwe') ; > insert into kmv (id, c1, c2) values (2, 'f22', 'qweasd') ; > insert into kmv (id, c1, c2) values (3, 'f23', 'qwea1') ; > insert into kmv (id, c1, c2) values (4, 'f24', '1qwe') ; > insert into kmv (id, c1, c2) values (5, 'f25', 'asdqwe') ; > select c2 from kmv.kmv where c2 like '%w%a%'; > {noformat} > Expected result: qweasd, qwea1. > Actual result: no rows. > Experiment 2 (NOTE: definition of index is changed): > {noformat} > drop keyspace if exists kmv; > create keyspace if not exists kmv WITH REPLICATION = { 'class' : > 'SimpleStrategy', 'replication_factor':'1'} ; > use kmv; > CREATE TABLE if not exists kmv (id int primary key, c1 text, c2 text); > CREATE CUSTOM INDEX ON kmv.kmv ( c2 ) USING > 'org.apache.cassandra.index.sasi.SASIIndex' WITH OPTIONS = { > 'mode': 'CONTAINS', > 'analyzer_class': > 'org.apache.cassandra.index.sasi.analyzer.StandardAnalyzer', > 'analyzed': 'true' > }; > insert into kmv (id, c1, c2) values (1, 'f21', 'qwe') ; > insert into kmv (id, c1, c2) values (2, 'f22', 'qweasd') ; > insert into kmv (id, c1, c2) values (3, 'f23', 'qwea1') ; > insert into kmv (id, c1, c2) values (4, 'f24', '1qwe') ; > insert into kmv (id, c1, c2) values (5, 'f25', 'asdqwe') ; > select c2 from kmv.kmv where c2 like '%w%a%'; > {noformat} > Expected result: qweasd, qwea1. > Actual result: asdqwe, qweasd, qwea1. > Experiment 3 (NOTE: primary key is compound now and inserted data was > changed): > {noformat} > drop keyspace if exists kmv; > create keyspace if not exists kmv WITH REPLICATION = { 'class' : > 'SimpleStrategy', 'replication_factor':'1'} ; > use kmv; > CREATE TABLE if not exists kmv (id int, c1 text, c2 text, PRIMARY KEY(id, > c1)); > CREATE CUSTOM INDEX ON kmv.kmv ( c2 ) USING > 'org.apache.cassandra.index.sasi.SASIIndex' WITH OPTIONS = { > 'mode': 'CONTAINS', > 'analyzer_class': > 'org.apache.cassandra.index.sasi.analyzer.StandardAnalyzer', > 'analyzed': 'true' > }; > insert into kmv (id, c1, c2) values (1, 'f21', 'qwe') ; > insert into kmv (id, c1, c2) values (1, 'f22', 'qweasd') ; > insert into kmv (id, c1, c2) values (1, 'f23', 'qwea1') ; > insert into kmv (id, c1, c2) values (1, 'f24', '1qwe') ; > insert into kmv (id, c1, c2) values (1, 'f25', 'asdqwe') ; > select c2 from kmv.kmv where c2 like '%w%a%'; > {noformat} > Expected result: qweasd, qwea1. > Actual result: qwe, qweasd, qwea1, 1qwe, asdqwe. > Experiment 4 (NOTE: search criteria is changed): > {noformat} > drop keyspace if exists kmv; > create keyspace if not exists kmv WITH REPLICATION = { 'class' : > 'SimpleStrategy', 'replication_factor':'1'} ; > use kmv; > CREATE TABLE if not exists kmv (id int, c1 text, c2 text, PRIMARY KEY(id, > c1)); > CREATE CUSTOM INDEX ON kmv.kmv ( c2 ) USING > 'org.apache.cassandra.index.sasi.SASIIndex' WITH OPTIONS = { > 'mode': 'CONTAINS', > 'analyzer_class': > 'org.apache.cassandra.index.sasi.analyzer.StandardAnalyzer', > 'analyzed': 'true' > }; > insert into kmv (id, c1, c2) values (1, 'f21', 'qwe') ; > insert into kmv (id, c1, c2) values (1, 'f22', 'qweasd') ; > insert into kmv (id, c1, c2) values (1, 'f23', 'qwea1') ; > insert into kmv (id, c1, c2) values (1, 'f24', '1qwe') ; > insert into kmv (id, c1, c2) values (1, 'f25', 'asdqwe') ; > select c2 from kmv.kmv where c2 like '%w22%a%'; > {noformat} > Expected result: no rows. > Actual result: qweasd, qwea1, asdqwe. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Assigned] (CASSANDRA-12573) SASI index. No results for '%foo%bar%'-like search pattern.
[ https://issues.apache.org/jira/browse/CASSANDRA-12573?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Arunkumar M reassigned CASSANDRA-12573: --- Assignee: Arunkumar M > SASI index. No results for '%foo%bar%'-like search pattern. > > > Key: CASSANDRA-12573 > URL: https://issues.apache.org/jira/browse/CASSANDRA-12573 > Project: Cassandra > Issue Type: Bug >Reporter: Mikhail Krupitskiy >Assignee: Arunkumar M > > Cassandra 3.7. > 1) Create index for String column: > {noformat} > CREATE CUSTOM INDEX index_name ON Table (Column) USING > 'org.apache.cassandra.index.sasi.SASIIndex' WITH OPTIONS = {'mode': > 'CONTAINS'}; > {noformat} > 2) Insert some rows where Column contains 'foo' and 'bar'. E.g. '1foo2bar3'. > 3) Try to query rows where Column contains 'foo' and 'bar'. > Request {noformat}select * from Table where Column like '%foo%bar%'{noformat} > returns *no* rows. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (CASSANDRA-12330) Unreleased Resource: Sockets
[ https://issues.apache.org/jira/browse/CASSANDRA-12330?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Arunkumar M updated CASSANDRA-12330: Attachment: 12330-3.0.txt > Unreleased Resource: Sockets > > > Key: CASSANDRA-12330 > URL: https://issues.apache.org/jira/browse/CASSANDRA-12330 > Project: Cassandra > Issue Type: Sub-task >Reporter: Eduardo Aguinaga >Assignee: Arunkumar M > Labels: easyfix, newbie, patch > Fix For: 3.x > > Attachments: 12330-3.0.txt, 12330-3.0.txt > > > Overview: > In May through June of 2016 a static analysis was performed on version 3.0.5 > of the Cassandra source code. The analysis included an automated analysis > using HP Fortify v4.21 SCA and a manual analysis utilizing SciTools > Understand v4. The results of that analysis includes the issue below. > Issue: > Sockets are low level resources that must be explicitly released so > subsequent callers will have access to previously used sockets. In the file > DefaultConnectionFactory.java on line 52 a socket is acquired and eventually > returned to the caller on line 55. > If an exception is thrown by any of the code between lines 52 and 55 the > socket acquired on line 52 will not be released for subsequent reuse. > DefaultConnectionFactory.java, lines 50-73: > {code:java} > 50 try > 51 { > 52 Socket socket = OutboundTcpConnectionPool.newSocket(peer); > 53 > socket.setSoTimeout(DatabaseDescriptor.getStreamingSocketTimeout()); > 54 socket.setKeepAlive(true); > 55 return socket; > 56 } > 57 catch (IOException e) > 58 { > 59 if (++attempts >= MAX_CONNECT_ATTEMPTS) > 60 throw e; > 61 > 62 long waitms = DatabaseDescriptor.getRpcTimeout() * > (long)Math.pow(2, attempts); > 63 logger.warn("Failed attempt {} to connect to {}. Retrying in {} > ms. ({})", attempts, peer, waitms, e); > 64 try > 65 { > 66 Thread.sleep(waitms); > 67 } > 68 catch (InterruptedException wtf) > 69 { > 70 throw new IOException("interrupted", wtf); > 71 } > 72 } > 73 } > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (CASSANDRA-12330) Unreleased Resource: Sockets
[ https://issues.apache.org/jira/browse/CASSANDRA-12330?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15432130#comment-15432130 ] Arunkumar M commented on CASSANDRA-12330: - Yes, there is a way for doing this. The SocketException is already caught by IOException. Attached another patch. > Unreleased Resource: Sockets > > > Key: CASSANDRA-12330 > URL: https://issues.apache.org/jira/browse/CASSANDRA-12330 > Project: Cassandra > Issue Type: Sub-task >Reporter: Eduardo Aguinaga >Assignee: Arunkumar M > Labels: easyfix, newbie, patch > Fix For: 3.x > > Attachments: 12330-3.0.txt, 12330-3.0.txt > > > Overview: > In May through June of 2016 a static analysis was performed on version 3.0.5 > of the Cassandra source code. The analysis included an automated analysis > using HP Fortify v4.21 SCA and a manual analysis utilizing SciTools > Understand v4. The results of that analysis includes the issue below. > Issue: > Sockets are low level resources that must be explicitly released so > subsequent callers will have access to previously used sockets. In the file > DefaultConnectionFactory.java on line 52 a socket is acquired and eventually > returned to the caller on line 55. > If an exception is thrown by any of the code between lines 52 and 55 the > socket acquired on line 52 will not be released for subsequent reuse. > DefaultConnectionFactory.java, lines 50-73: > {code:java} > 50 try > 51 { > 52 Socket socket = OutboundTcpConnectionPool.newSocket(peer); > 53 > socket.setSoTimeout(DatabaseDescriptor.getStreamingSocketTimeout()); > 54 socket.setKeepAlive(true); > 55 return socket; > 56 } > 57 catch (IOException e) > 58 { > 59 if (++attempts >= MAX_CONNECT_ATTEMPTS) > 60 throw e; > 61 > 62 long waitms = DatabaseDescriptor.getRpcTimeout() * > (long)Math.pow(2, attempts); > 63 logger.warn("Failed attempt {} to connect to {}. Retrying in {} > ms. ({})", attempts, peer, waitms, e); > 64 try > 65 { > 66 Thread.sleep(waitms); > 67 } > 68 catch (InterruptedException wtf) > 69 { > 70 throw new IOException("interrupted", wtf); > 71 } > 72 } > 73 } > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (CASSANDRA-12506) nodetool compactionhistory in it's output should have timestamp in human readable format
[ https://issues.apache.org/jira/browse/CASSANDRA-12506?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15429613#comment-15429613 ] Arunkumar M commented on CASSANDRA-12506: - Compactionhistory is already showing the timestamp in human readable format (compacted_at). >bin/nodetool compactionhistory Compaction History: id keyspace_name columnfamily_name compacted_at bytes_in bytes_out rows_merged 9a9240a0-6766-11e6-ab55-1b95258e9e06 systemlocal 2016-08-20T23:15:05.898 535 293 {4:1} 99c02390-6766-11e6-ab55-1b95258e9e06 systemlocal 2016-08-20T23:15:04.521 506 401 {5:1} Could you please explain further? > nodetool compactionhistory in it's output should have timestamp in human > readable format > > > Key: CASSANDRA-12506 > URL: https://issues.apache.org/jira/browse/CASSANDRA-12506 > Project: Cassandra > Issue Type: Improvement > Components: Compaction > Environment: AWS >Reporter: Kenneth Failbus >Priority: Minor > > While running nodetool compactionhistory the output shows id and other > columns. I wanted to also see the timestamp for each id that got executed in > human readable format > So, e.g. in the output if column id can be preceded by human readable > timestamp format, it will help in understanding when a particular compaction > ran and it's impact on the system resources. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (CASSANDRA-12329) Unreleased Resource: Sockets
[ https://issues.apache.org/jira/browse/CASSANDRA-12329?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15429588#comment-15429588 ] Arunkumar M commented on CASSANDRA-12329: - Yes, I have updated the patch. > Unreleased Resource: Sockets > > > Key: CASSANDRA-12329 > URL: https://issues.apache.org/jira/browse/CASSANDRA-12329 > Project: Cassandra > Issue Type: Sub-task >Reporter: Eduardo Aguinaga >Assignee: Arunkumar M > Labels: easyfix, newbie, patch > Fix For: 3.0.x > > Attachments: 12329-3.0.txt > > > Overview: > In May through June of 2016 a static analysis was performed on version 3.0.5 > of the Cassandra source code. The analysis included an automated analysis > using HP Fortify v4.21 SCA and a manual analysis utilizing SciTools > Understand v4. The results of that analysis includes the issue below. > Issue: > Sockets are low level resources that must be explicitly released so > subsequent callers will have access to previously used sockets. In the file > SSLFactory.java on line 62 a SSL server socket is acquired and eventually > returned to the caller on line 69. > If an exception is thrown by any of the code between lines 62 and 69 the > socket acquired on line 62 will not be released for subsequent reuse.. > {code:java} > SSLFactory.java, lines 59-70: > 59 public static SSLServerSocket getServerSocket(EncryptionOptions options, > InetAddress address, int port) throws IOException > 60 { > 61 SSLContext ctx = createSSLContext(options, true); > 62 SSLServerSocket serverSocket = > (SSLServerSocket)ctx.getServerSocketFactory().createServerSocket(); > 63 serverSocket.setReuseAddress(true); > 64 String[] suites = > filterCipherSuites(serverSocket.getSupportedCipherSuites(), > options.cipher_suites); > 65 serverSocket.setEnabledCipherSuites(suites); > 66 serverSocket.setNeedClientAuth(options.require_client_auth); > 67 serverSocket.setEnabledProtocols(ACCEPTED_PROTOCOLS); > 68 serverSocket.bind(new InetSocketAddress(address, port), 500); > 69 return serverSocket; > 70 } > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (CASSANDRA-12329) Unreleased Resource: Sockets
[ https://issues.apache.org/jira/browse/CASSANDRA-12329?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Arunkumar M updated CASSANDRA-12329: Attachment: 12329-3.0.txt > Unreleased Resource: Sockets > > > Key: CASSANDRA-12329 > URL: https://issues.apache.org/jira/browse/CASSANDRA-12329 > Project: Cassandra > Issue Type: Sub-task >Reporter: Eduardo Aguinaga >Assignee: Arunkumar M > Labels: easyfix, newbie, patch > Fix For: 3.0.x > > Attachments: 12329-3.0.txt > > > Overview: > In May through June of 2016 a static analysis was performed on version 3.0.5 > of the Cassandra source code. The analysis included an automated analysis > using HP Fortify v4.21 SCA and a manual analysis utilizing SciTools > Understand v4. The results of that analysis includes the issue below. > Issue: > Sockets are low level resources that must be explicitly released so > subsequent callers will have access to previously used sockets. In the file > SSLFactory.java on line 62 a SSL server socket is acquired and eventually > returned to the caller on line 69. > If an exception is thrown by any of the code between lines 62 and 69 the > socket acquired on line 62 will not be released for subsequent reuse.. > {code:java} > SSLFactory.java, lines 59-70: > 59 public static SSLServerSocket getServerSocket(EncryptionOptions options, > InetAddress address, int port) throws IOException > 60 { > 61 SSLContext ctx = createSSLContext(options, true); > 62 SSLServerSocket serverSocket = > (SSLServerSocket)ctx.getServerSocketFactory().createServerSocket(); > 63 serverSocket.setReuseAddress(true); > 64 String[] suites = > filterCipherSuites(serverSocket.getSupportedCipherSuites(), > options.cipher_suites); > 65 serverSocket.setEnabledCipherSuites(suites); > 66 serverSocket.setNeedClientAuth(options.require_client_auth); > 67 serverSocket.setEnabledProtocols(ACCEPTED_PROTOCOLS); > 68 serverSocket.bind(new InetSocketAddress(address, port), 500); > 69 return serverSocket; > 70 } > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (CASSANDRA-12329) Unreleased Resource: Sockets
[ https://issues.apache.org/jira/browse/CASSANDRA-12329?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Arunkumar M updated CASSANDRA-12329: Attachment: (was: 12329-3.0.txt) > Unreleased Resource: Sockets > > > Key: CASSANDRA-12329 > URL: https://issues.apache.org/jira/browse/CASSANDRA-12329 > Project: Cassandra > Issue Type: Sub-task >Reporter: Eduardo Aguinaga >Assignee: Arunkumar M > Labels: easyfix, newbie, patch > Fix For: 3.0.x > > > Overview: > In May through June of 2016 a static analysis was performed on version 3.0.5 > of the Cassandra source code. The analysis included an automated analysis > using HP Fortify v4.21 SCA and a manual analysis utilizing SciTools > Understand v4. The results of that analysis includes the issue below. > Issue: > Sockets are low level resources that must be explicitly released so > subsequent callers will have access to previously used sockets. In the file > SSLFactory.java on line 62 a SSL server socket is acquired and eventually > returned to the caller on line 69. > If an exception is thrown by any of the code between lines 62 and 69 the > socket acquired on line 62 will not be released for subsequent reuse.. > {code:java} > SSLFactory.java, lines 59-70: > 59 public static SSLServerSocket getServerSocket(EncryptionOptions options, > InetAddress address, int port) throws IOException > 60 { > 61 SSLContext ctx = createSSLContext(options, true); > 62 SSLServerSocket serverSocket = > (SSLServerSocket)ctx.getServerSocketFactory().createServerSocket(); > 63 serverSocket.setReuseAddress(true); > 64 String[] suites = > filterCipherSuites(serverSocket.getSupportedCipherSuites(), > options.cipher_suites); > 65 serverSocket.setEnabledCipherSuites(suites); > 66 serverSocket.setNeedClientAuth(options.require_client_auth); > 67 serverSocket.setEnabledProtocols(ACCEPTED_PROTOCOLS); > 68 serverSocket.bind(new InetSocketAddress(address, port), 500); > 69 return serverSocket; > 70 } > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Comment Edited] (CASSANDRA-11534) cqlsh fails to format collections when using aliases
[ https://issues.apache.org/jira/browse/CASSANDRA-11534?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15426021#comment-15426021 ] Arunkumar M edited comment on CASSANDRA-11534 at 8/18/16 7:29 AM: -- This is because while formatting the row values the corresponding "cql_types" (ex: list[text], text) are None for all the aliases. In the line /bin/cqlsh.py#L1339 cql_types = [CqlType(table_meta.columns[c].cql_type, ks_meta) if c in table_meta.columns else None for c in column_names] formatted_values = [map(self.myformat_value, row.values(), cql_types) for row in rows] "table_meta.columns" contains the actual column names but "column_names" from result query contains the aliases so the cql_types list contains None for the aliases. Related ticket: https://issues.apache.org/jira/browse/CASSANDRA-11274 was (Author: arunkumar): This is because while formatting the row values the corresponding "cql_types" (ex: list[text], text) are None for all the aliases. In the line /bin/cqlsh.py#L1339 cql_types = [CqlType(table_meta.columns[c].cql_type, ks_meta) if c in table_meta.columns else None for c in column_names] "table_meta.columns" contains the actual column names but "column_names" from result query contains the aliases so the cql_types list contains None for the aliases. Related ticket: https://issues.apache.org/jira/browse/CASSANDRA-11274 > cqlsh fails to format collections when using aliases > > > Key: CASSANDRA-11534 > URL: https://issues.apache.org/jira/browse/CASSANDRA-11534 > Project: Cassandra > Issue Type: Bug >Reporter: Robert Stupp >Priority: Minor > > Given is a simple table. Selecting the columns without an alias works fine. > However, if the map is selected using an alias, cqlsh fails to format the > value. > {code} > create keyspace foo WITH replication = {'class': 'SimpleStrategy', > 'replication_factor': 1}; > CREATE TABLE foo.foo (id int primary key, m map); > insert into foo.foo (id, m) VALUES ( 1, {1: 'one', 2: 'two', 3:'three'}); > insert into foo.foo (id, m) VALUES ( 2, {1: '1one', 2: '2two', 3:'3three'}); > cqlsh> select id, m from foo.foo; > id | m > +- > 1 |{1: 'one', 2: 'two', 3: 'three'} > 2 | {1: '1one', 2: '2two', 3: '3three'} > (2 rows) > cqlsh> select id, m as "weofjkewopf" from foo.foo; > id | weofjkewopf > +--- > 1 |OrderedMapSerializedKey([(1, u'one'), (2, u'two'), (3, u'three')]) > 2 | OrderedMapSerializedKey([(1, u'1one'), (2, u'2two'), (3, u'3three')]) > (2 rows) > Failed to format value OrderedMapSerializedKey([(1, u'one'), (2, u'two'), (3, > u'three')]) : 'NoneType' object has no attribute 'sub_types' > Failed to format value OrderedMapSerializedKey([(1, u'1one'), (2, u'2two'), > (3, u'3three')]) : 'NoneType' object has no attribute 'sub_types' > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Comment Edited] (CASSANDRA-11534) cqlsh fails to format collections when using aliases
[ https://issues.apache.org/jira/browse/CASSANDRA-11534?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15426021#comment-15426021 ] Arunkumar M edited comment on CASSANDRA-11534 at 8/18/16 7:26 AM: -- This is because while formatting the row values the corresponding "cql_types" (ex: list[text], text) are None for all the aliases. In the line /bin/cqlsh.py#L1339 cql_types = [CqlType(table_meta.columns[c].cql_type, ks_meta) if c in table_meta.columns else None for c in column_names] "table_meta.columns" contains the actual column names but "column_names" from result query contains the aliases so the cql_types list contains None for the aliases. Related ticket: https://issues.apache.org/jira/browse/CASSANDRA-11274 was (Author: arunkumar): This is because while formatting the row values the corresponding "cql_types" (ex: list[text], text) are None for all the aliases. In the line /bin/cqlsh.py#L1339 cql_types = [CqlType(table_meta.columns[c].cql_type, ks_meta) if c in table_meta.columns else None for c in column_names] "table_meta.columns" contains the actual column names but "column_names" from result query contains the aliases so the cql_types list contains None for the aliases. > cqlsh fails to format collections when using aliases > > > Key: CASSANDRA-11534 > URL: https://issues.apache.org/jira/browse/CASSANDRA-11534 > Project: Cassandra > Issue Type: Bug >Reporter: Robert Stupp >Priority: Minor > > Given is a simple table. Selecting the columns without an alias works fine. > However, if the map is selected using an alias, cqlsh fails to format the > value. > {code} > create keyspace foo WITH replication = {'class': 'SimpleStrategy', > 'replication_factor': 1}; > CREATE TABLE foo.foo (id int primary key, m map); > insert into foo.foo (id, m) VALUES ( 1, {1: 'one', 2: 'two', 3:'three'}); > insert into foo.foo (id, m) VALUES ( 2, {1: '1one', 2: '2two', 3:'3three'}); > cqlsh> select id, m from foo.foo; > id | m > +- > 1 |{1: 'one', 2: 'two', 3: 'three'} > 2 | {1: '1one', 2: '2two', 3: '3three'} > (2 rows) > cqlsh> select id, m as "weofjkewopf" from foo.foo; > id | weofjkewopf > +--- > 1 |OrderedMapSerializedKey([(1, u'one'), (2, u'two'), (3, u'three')]) > 2 | OrderedMapSerializedKey([(1, u'1one'), (2, u'2two'), (3, u'3three')]) > (2 rows) > Failed to format value OrderedMapSerializedKey([(1, u'one'), (2, u'two'), (3, > u'three')]) : 'NoneType' object has no attribute 'sub_types' > Failed to format value OrderedMapSerializedKey([(1, u'1one'), (2, u'2two'), > (3, u'3three')]) : 'NoneType' object has no attribute 'sub_types' > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (CASSANDRA-11534) cqlsh fails to format collections when using aliases
[ https://issues.apache.org/jira/browse/CASSANDRA-11534?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15426021#comment-15426021 ] Arunkumar M commented on CASSANDRA-11534: - This is because while formatting the row values the corresponding "cql_types" (ex: list[text], text) are None for all the aliases. In the line /bin/cqlsh.py#L1339 cql_types = [CqlType(table_meta.columns[c].cql_type, ks_meta) if c in table_meta.columns else None for c in column_names] "table_meta.columns" contains the actual column names but "column_names" from result query contains the aliases so the cql_types list contains None for the aliases. > cqlsh fails to format collections when using aliases > > > Key: CASSANDRA-11534 > URL: https://issues.apache.org/jira/browse/CASSANDRA-11534 > Project: Cassandra > Issue Type: Bug >Reporter: Robert Stupp >Priority: Minor > > Given is a simple table. Selecting the columns without an alias works fine. > However, if the map is selected using an alias, cqlsh fails to format the > value. > {code} > create keyspace foo WITH replication = {'class': 'SimpleStrategy', > 'replication_factor': 1}; > CREATE TABLE foo.foo (id int primary key, m map); > insert into foo.foo (id, m) VALUES ( 1, {1: 'one', 2: 'two', 3:'three'}); > insert into foo.foo (id, m) VALUES ( 2, {1: '1one', 2: '2two', 3:'3three'}); > cqlsh> select id, m from foo.foo; > id | m > +- > 1 |{1: 'one', 2: 'two', 3: 'three'} > 2 | {1: '1one', 2: '2two', 3: '3three'} > (2 rows) > cqlsh> select id, m as "weofjkewopf" from foo.foo; > id | weofjkewopf > +--- > 1 |OrderedMapSerializedKey([(1, u'one'), (2, u'two'), (3, u'three')]) > 2 | OrderedMapSerializedKey([(1, u'1one'), (2, u'2two'), (3, u'3three')]) > (2 rows) > Failed to format value OrderedMapSerializedKey([(1, u'one'), (2, u'two'), (3, > u'three')]) : 'NoneType' object has no attribute 'sub_types' > Failed to format value OrderedMapSerializedKey([(1, u'1one'), (2, u'2two'), > (3, u'3three')]) : 'NoneType' object has no attribute 'sub_types' > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (CASSANDRA-11534) cqlsh fails to format collections when using aliases
[ https://issues.apache.org/jira/browse/CASSANDRA-11534?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Arunkumar M updated CASSANDRA-11534: Assignee: (was: Arunkumar M) > cqlsh fails to format collections when using aliases > > > Key: CASSANDRA-11534 > URL: https://issues.apache.org/jira/browse/CASSANDRA-11534 > Project: Cassandra > Issue Type: Bug >Reporter: Robert Stupp >Priority: Minor > > Given is a simple table. Selecting the columns without an alias works fine. > However, if the map is selected using an alias, cqlsh fails to format the > value. > {code} > create keyspace foo WITH replication = {'class': 'SimpleStrategy', > 'replication_factor': 1}; > CREATE TABLE foo.foo (id int primary key, m map); > insert into foo.foo (id, m) VALUES ( 1, {1: 'one', 2: 'two', 3:'three'}); > insert into foo.foo (id, m) VALUES ( 2, {1: '1one', 2: '2two', 3:'3three'}); > cqlsh> select id, m from foo.foo; > id | m > +- > 1 |{1: 'one', 2: 'two', 3: 'three'} > 2 | {1: '1one', 2: '2two', 3: '3three'} > (2 rows) > cqlsh> select id, m as "weofjkewopf" from foo.foo; > id | weofjkewopf > +--- > 1 |OrderedMapSerializedKey([(1, u'one'), (2, u'two'), (3, u'three')]) > 2 | OrderedMapSerializedKey([(1, u'1one'), (2, u'2two'), (3, u'3three')]) > (2 rows) > Failed to format value OrderedMapSerializedKey([(1, u'one'), (2, u'two'), (3, > u'three')]) : 'NoneType' object has no attribute 'sub_types' > Failed to format value OrderedMapSerializedKey([(1, u'1one'), (2, u'2two'), > (3, u'3three')]) : 'NoneType' object has no attribute 'sub_types' > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Assigned] (CASSANDRA-11534) cqlsh fails to format collections when using aliases
[ https://issues.apache.org/jira/browse/CASSANDRA-11534?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Arunkumar M reassigned CASSANDRA-11534: --- Assignee: Arunkumar M > cqlsh fails to format collections when using aliases > > > Key: CASSANDRA-11534 > URL: https://issues.apache.org/jira/browse/CASSANDRA-11534 > Project: Cassandra > Issue Type: Bug >Reporter: Robert Stupp >Assignee: Arunkumar M >Priority: Minor > > Given is a simple table. Selecting the columns without an alias works fine. > However, if the map is selected using an alias, cqlsh fails to format the > value. > {code} > create keyspace foo WITH replication = {'class': 'SimpleStrategy', > 'replication_factor': 1}; > CREATE TABLE foo.foo (id int primary key, m map); > insert into foo.foo (id, m) VALUES ( 1, {1: 'one', 2: 'two', 3:'three'}); > insert into foo.foo (id, m) VALUES ( 2, {1: '1one', 2: '2two', 3:'3three'}); > cqlsh> select id, m from foo.foo; > id | m > +- > 1 |{1: 'one', 2: 'two', 3: 'three'} > 2 | {1: '1one', 2: '2two', 3: '3three'} > (2 rows) > cqlsh> select id, m as "weofjkewopf" from foo.foo; > id | weofjkewopf > +--- > 1 |OrderedMapSerializedKey([(1, u'one'), (2, u'two'), (3, u'three')]) > 2 | OrderedMapSerializedKey([(1, u'1one'), (2, u'2two'), (3, u'3three')]) > (2 rows) > Failed to format value OrderedMapSerializedKey([(1, u'one'), (2, u'two'), (3, > u'three')]) : 'NoneType' object has no attribute 'sub_types' > Failed to format value OrderedMapSerializedKey([(1, u'1one'), (2, u'2two'), > (3, u'3three')]) : 'NoneType' object has no attribute 'sub_types' > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (CASSANDRA-12330) Unreleased Resource: Sockets
[ https://issues.apache.org/jira/browse/CASSANDRA-12330?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Arunkumar M updated CASSANDRA-12330: Attachment: 12330-3.0.txt > Unreleased Resource: Sockets > > > Key: CASSANDRA-12330 > URL: https://issues.apache.org/jira/browse/CASSANDRA-12330 > Project: Cassandra > Issue Type: Sub-task >Reporter: Eduardo Aguinaga > Attachments: 12330-3.0.txt > > > Overview: > In May through June of 2016 a static analysis was performed on version 3.0.5 > of the Cassandra source code. The analysis included an automated analysis > using HP Fortify v4.21 SCA and a manual analysis utilizing SciTools > Understand v4. The results of that analysis includes the issue below. > Issue: > Sockets are low level resources that must be explicitly released so > subsequent callers will have access to previously used sockets. In the file > DefaultConnectionFactory.java on line 52 a socket is acquired and eventually > returned to the caller on line 55. > If an exception is thrown by any of the code between lines 52 and 55 the > socket acquired on line 52 will not be released for subsequent reuse. > DefaultConnectionFactory.java, lines 50-73: > {code:java} > 50 try > 51 { > 52 Socket socket = OutboundTcpConnectionPool.newSocket(peer); > 53 > socket.setSoTimeout(DatabaseDescriptor.getStreamingSocketTimeout()); > 54 socket.setKeepAlive(true); > 55 return socket; > 56 } > 57 catch (IOException e) > 58 { > 59 if (++attempts >= MAX_CONNECT_ATTEMPTS) > 60 throw e; > 61 > 62 long waitms = DatabaseDescriptor.getRpcTimeout() * > (long)Math.pow(2, attempts); > 63 logger.warn("Failed attempt {} to connect to {}. Retrying in {} > ms. ({})", attempts, peer, waitms, e); > 64 try > 65 { > 66 Thread.sleep(waitms); > 67 } > 68 catch (InterruptedException wtf) > 69 { > 70 throw new IOException("interrupted", wtf); > 71 } > 72 } > 73 } > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (CASSANDRA-12330) Unreleased Resource: Sockets
[ https://issues.apache.org/jira/browse/CASSANDRA-12330?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Arunkumar M updated CASSANDRA-12330: Labels: easyfix newbie patch (was: ) Assignee: Arunkumar M Reviewer: Yuki Morishita Fix Version/s: 3.x Status: Patch Available (was: Open) > Unreleased Resource: Sockets > > > Key: CASSANDRA-12330 > URL: https://issues.apache.org/jira/browse/CASSANDRA-12330 > Project: Cassandra > Issue Type: Sub-task >Reporter: Eduardo Aguinaga >Assignee: Arunkumar M > Labels: patch, newbie, easyfix > Fix For: 3.x > > Attachments: 12330-3.0.txt > > > Overview: > In May through June of 2016 a static analysis was performed on version 3.0.5 > of the Cassandra source code. The analysis included an automated analysis > using HP Fortify v4.21 SCA and a manual analysis utilizing SciTools > Understand v4. The results of that analysis includes the issue below. > Issue: > Sockets are low level resources that must be explicitly released so > subsequent callers will have access to previously used sockets. In the file > DefaultConnectionFactory.java on line 52 a socket is acquired and eventually > returned to the caller on line 55. > If an exception is thrown by any of the code between lines 52 and 55 the > socket acquired on line 52 will not be released for subsequent reuse. > DefaultConnectionFactory.java, lines 50-73: > {code:java} > 50 try > 51 { > 52 Socket socket = OutboundTcpConnectionPool.newSocket(peer); > 53 > socket.setSoTimeout(DatabaseDescriptor.getStreamingSocketTimeout()); > 54 socket.setKeepAlive(true); > 55 return socket; > 56 } > 57 catch (IOException e) > 58 { > 59 if (++attempts >= MAX_CONNECT_ATTEMPTS) > 60 throw e; > 61 > 62 long waitms = DatabaseDescriptor.getRpcTimeout() * > (long)Math.pow(2, attempts); > 63 logger.warn("Failed attempt {} to connect to {}. Retrying in {} > ms. ({})", attempts, peer, waitms, e); > 64 try > 65 { > 66 Thread.sleep(waitms); > 67 } > 68 catch (InterruptedException wtf) > 69 { > 70 throw new IOException("interrupted", wtf); > 71 } > 72 } > 73 } > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (CASSANDRA-12329) Unreleased Resource: Sockets
[ https://issues.apache.org/jira/browse/CASSANDRA-12329?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Arunkumar M updated CASSANDRA-12329: Attachment: 12329-3.0.txt > Unreleased Resource: Sockets > > > Key: CASSANDRA-12329 > URL: https://issues.apache.org/jira/browse/CASSANDRA-12329 > Project: Cassandra > Issue Type: Sub-task >Reporter: Eduardo Aguinaga >Assignee: Arunkumar M > Labels: easyfix, newbie, patch > Fix For: 3.0.x > > Attachments: 12329-3.0.txt > > > Overview: > In May through June of 2016 a static analysis was performed on version 3.0.5 > of the Cassandra source code. The analysis included an automated analysis > using HP Fortify v4.21 SCA and a manual analysis utilizing SciTools > Understand v4. The results of that analysis includes the issue below. > Issue: > Sockets are low level resources that must be explicitly released so > subsequent callers will have access to previously used sockets. In the file > SSLFactory.java on line 62 a SSL server socket is acquired and eventually > returned to the caller on line 69. > If an exception is thrown by any of the code between lines 62 and 69 the > socket acquired on line 62 will not be released for subsequent reuse.. > {code:java} > SSLFactory.java, lines 59-70: > 59 public static SSLServerSocket getServerSocket(EncryptionOptions options, > InetAddress address, int port) throws IOException > 60 { > 61 SSLContext ctx = createSSLContext(options, true); > 62 SSLServerSocket serverSocket = > (SSLServerSocket)ctx.getServerSocketFactory().createServerSocket(); > 63 serverSocket.setReuseAddress(true); > 64 String[] suites = > filterCipherSuites(serverSocket.getSupportedCipherSuites(), > options.cipher_suites); > 65 serverSocket.setEnabledCipherSuites(suites); > 66 serverSocket.setNeedClientAuth(options.require_client_auth); > 67 serverSocket.setEnabledProtocols(ACCEPTED_PROTOCOLS); > 68 serverSocket.bind(new InetSocketAddress(address, port), 500); > 69 return serverSocket; > 70 } > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (CASSANDRA-12329) Unreleased Resource: Sockets
[ https://issues.apache.org/jira/browse/CASSANDRA-12329?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Arunkumar M updated CASSANDRA-12329: Labels: easyfix newbie patch (was: ) Assignee: Arunkumar M Reviewer: Yuki Morishita Fix Version/s: 3.0.x Status: Patch Available (was: Open) > Unreleased Resource: Sockets > > > Key: CASSANDRA-12329 > URL: https://issues.apache.org/jira/browse/CASSANDRA-12329 > Project: Cassandra > Issue Type: Sub-task >Reporter: Eduardo Aguinaga >Assignee: Arunkumar M > Labels: patch, newbie, easyfix > Fix For: 3.0.x > > > Overview: > In May through June of 2016 a static analysis was performed on version 3.0.5 > of the Cassandra source code. The analysis included an automated analysis > using HP Fortify v4.21 SCA and a manual analysis utilizing SciTools > Understand v4. The results of that analysis includes the issue below. > Issue: > Sockets are low level resources that must be explicitly released so > subsequent callers will have access to previously used sockets. In the file > SSLFactory.java on line 62 a SSL server socket is acquired and eventually > returned to the caller on line 69. > If an exception is thrown by any of the code between lines 62 and 69 the > socket acquired on line 62 will not be released for subsequent reuse.. > {code:java} > SSLFactory.java, lines 59-70: > 59 public static SSLServerSocket getServerSocket(EncryptionOptions options, > InetAddress address, int port) throws IOException > 60 { > 61 SSLContext ctx = createSSLContext(options, true); > 62 SSLServerSocket serverSocket = > (SSLServerSocket)ctx.getServerSocketFactory().createServerSocket(); > 63 serverSocket.setReuseAddress(true); > 64 String[] suites = > filterCipherSuites(serverSocket.getSupportedCipherSuites(), > options.cipher_suites); > 65 serverSocket.setEnabledCipherSuites(suites); > 66 serverSocket.setNeedClientAuth(options.require_client_auth); > 67 serverSocket.setEnabledProtocols(ACCEPTED_PROTOCOLS); > 68 serverSocket.bind(new InetSocketAddress(address, port), 500); > 69 return serverSocket; > 70 } > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (CASSANDRA-12331) Unreleased Resource: Sockets
[ https://issues.apache.org/jira/browse/CASSANDRA-12331?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Arunkumar M updated CASSANDRA-12331: Attachment: 12331-3.0.txt > Unreleased Resource: Sockets > > > Key: CASSANDRA-12331 > URL: https://issues.apache.org/jira/browse/CASSANDRA-12331 > Project: Cassandra > Issue Type: Sub-task >Reporter: Eduardo Aguinaga > Labels: easyfix, newbie, patch > Attachments: 12331-3.0.txt > > > Overview: > In May through June of 2016 a static analysis was performed on version 3.0.5 > of the Cassandra source code. The analysis included an automated analysis > using HP Fortify v4.21 SCA and a manual analysis utilizing SciTools > Understand v4. The results of that analysis includes the issue below. > Issue: > Sockets are low level resources that must be explicitly released so > subsequent callers will have access to previously used sockets. In the file > RMIServerSocketFactoryImpl.java on lines 15-16 a socket is acquired and > eventually returned to the caller on line 18. > If an exception is thrown by the code on line 17 the socket acquired on lines > 15-16 will not be released for subsequent reuse. > RMIServerSocketFactoryImpl.java, lines 13-19: > {code:java} > 13 public ServerSocket createServerSocket(final int pPort) throws IOException > 14 { > 15 ServerSocket socket = ServerSocketFactory.getDefault() > 16 .createServerSocket(pPort, 0, > InetAddress.getLoopbackAddress()); > 17 socket.setReuseAddress(true); > 18 return socket; > 19 } > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (CASSANDRA-12331) Unreleased Resource: Sockets
[ https://issues.apache.org/jira/browse/CASSANDRA-12331?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Arunkumar M updated CASSANDRA-12331: Attachment: (was: 12331-3.0.txt) > Unreleased Resource: Sockets > > > Key: CASSANDRA-12331 > URL: https://issues.apache.org/jira/browse/CASSANDRA-12331 > Project: Cassandra > Issue Type: Sub-task >Reporter: Eduardo Aguinaga > Labels: easyfix, newbie, patch > Attachments: 12331-3.0.txt > > > Overview: > In May through June of 2016 a static analysis was performed on version 3.0.5 > of the Cassandra source code. The analysis included an automated analysis > using HP Fortify v4.21 SCA and a manual analysis utilizing SciTools > Understand v4. The results of that analysis includes the issue below. > Issue: > Sockets are low level resources that must be explicitly released so > subsequent callers will have access to previously used sockets. In the file > RMIServerSocketFactoryImpl.java on lines 15-16 a socket is acquired and > eventually returned to the caller on line 18. > If an exception is thrown by the code on line 17 the socket acquired on lines > 15-16 will not be released for subsequent reuse. > RMIServerSocketFactoryImpl.java, lines 13-19: > {code:java} > 13 public ServerSocket createServerSocket(final int pPort) throws IOException > 14 { > 15 ServerSocket socket = ServerSocketFactory.getDefault() > 16 .createServerSocket(pPort, 0, > InetAddress.getLoopbackAddress()); > 17 socket.setReuseAddress(true); > 18 return socket; > 19 } > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (CASSANDRA-12331) Unreleased Resource: Sockets
[ https://issues.apache.org/jira/browse/CASSANDRA-12331?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Arunkumar M updated CASSANDRA-12331: Attachment: 12331-3.0.txt > Unreleased Resource: Sockets > > > Key: CASSANDRA-12331 > URL: https://issues.apache.org/jira/browse/CASSANDRA-12331 > Project: Cassandra > Issue Type: Sub-task >Reporter: Eduardo Aguinaga > Labels: easyfix, newbie, patch > Attachments: 12331-3.0.txt > > > Overview: > In May through June of 2016 a static analysis was performed on version 3.0.5 > of the Cassandra source code. The analysis included an automated analysis > using HP Fortify v4.21 SCA and a manual analysis utilizing SciTools > Understand v4. The results of that analysis includes the issue below. > Issue: > Sockets are low level resources that must be explicitly released so > subsequent callers will have access to previously used sockets. In the file > RMIServerSocketFactoryImpl.java on lines 15-16 a socket is acquired and > eventually returned to the caller on line 18. > If an exception is thrown by the code on line 17 the socket acquired on lines > 15-16 will not be released for subsequent reuse. > RMIServerSocketFactoryImpl.java, lines 13-19: > {code:java} > 13 public ServerSocket createServerSocket(final int pPort) throws IOException > 14 { > 15 ServerSocket socket = ServerSocketFactory.getDefault() > 16 .createServerSocket(pPort, 0, > InetAddress.getLoopbackAddress()); > 17 socket.setReuseAddress(true); > 18 return socket; > 19 } > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (CASSANDRA-12331) Unreleased Resource: Sockets
[ https://issues.apache.org/jira/browse/CASSANDRA-12331?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Arunkumar M updated CASSANDRA-12331: Attachment: (was: 12331-3.0.txt) > Unreleased Resource: Sockets > > > Key: CASSANDRA-12331 > URL: https://issues.apache.org/jira/browse/CASSANDRA-12331 > Project: Cassandra > Issue Type: Sub-task >Reporter: Eduardo Aguinaga > Labels: easyfix, newbie, patch > > Overview: > In May through June of 2016 a static analysis was performed on version 3.0.5 > of the Cassandra source code. The analysis included an automated analysis > using HP Fortify v4.21 SCA and a manual analysis utilizing SciTools > Understand v4. The results of that analysis includes the issue below. > Issue: > Sockets are low level resources that must be explicitly released so > subsequent callers will have access to previously used sockets. In the file > RMIServerSocketFactoryImpl.java on lines 15-16 a socket is acquired and > eventually returned to the caller on line 18. > If an exception is thrown by the code on line 17 the socket acquired on lines > 15-16 will not be released for subsequent reuse. > RMIServerSocketFactoryImpl.java, lines 13-19: > {code:java} > 13 public ServerSocket createServerSocket(final int pPort) throws IOException > 14 { > 15 ServerSocket socket = ServerSocketFactory.getDefault() > 16 .createServerSocket(pPort, 0, > InetAddress.getLoopbackAddress()); > 17 socket.setReuseAddress(true); > 18 return socket; > 19 } > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Issue Comment Deleted] (CASSANDRA-12331) Unreleased Resource: Sockets
[ https://issues.apache.org/jira/browse/CASSANDRA-12331?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Arunkumar M updated CASSANDRA-12331: Comment: was deleted (was: https://github.com/arun-mk/cassandra/commit/ab76c29a7a4e884f515b4438a3f8feb5877a95d6) > Unreleased Resource: Sockets > > > Key: CASSANDRA-12331 > URL: https://issues.apache.org/jira/browse/CASSANDRA-12331 > Project: Cassandra > Issue Type: Sub-task >Reporter: Eduardo Aguinaga > Labels: easyfix, newbie, patch > Attachments: 12331-3.0.txt > > > Overview: > In May through June of 2016 a static analysis was performed on version 3.0.5 > of the Cassandra source code. The analysis included an automated analysis > using HP Fortify v4.21 SCA and a manual analysis utilizing SciTools > Understand v4. The results of that analysis includes the issue below. > Issue: > Sockets are low level resources that must be explicitly released so > subsequent callers will have access to previously used sockets. In the file > RMIServerSocketFactoryImpl.java on lines 15-16 a socket is acquired and > eventually returned to the caller on line 18. > If an exception is thrown by the code on line 17 the socket acquired on lines > 15-16 will not be released for subsequent reuse. > RMIServerSocketFactoryImpl.java, lines 13-19: > {code:java} > 13 public ServerSocket createServerSocket(final int pPort) throws IOException > 14 { > 15 ServerSocket socket = ServerSocketFactory.getDefault() > 16 .createServerSocket(pPort, 0, > InetAddress.getLoopbackAddress()); > 17 socket.setReuseAddress(true); > 18 return socket; > 19 } > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Issue Comment Deleted] (CASSANDRA-12331) Unreleased Resource: Sockets
[ https://issues.apache.org/jira/browse/CASSANDRA-12331?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Arunkumar M updated CASSANDRA-12331: Comment: was deleted (was: Patch attached Github: https://github.com/arun-mk/cassandra/commit/ab76c29a7a4e884f515b4438a3f8feb5877a95d6) > Unreleased Resource: Sockets > > > Key: CASSANDRA-12331 > URL: https://issues.apache.org/jira/browse/CASSANDRA-12331 > Project: Cassandra > Issue Type: Sub-task >Reporter: Eduardo Aguinaga > Labels: easyfix, newbie, patch > Attachments: 12331-3.0.txt > > > Overview: > In May through June of 2016 a static analysis was performed on version 3.0.5 > of the Cassandra source code. The analysis included an automated analysis > using HP Fortify v4.21 SCA and a manual analysis utilizing SciTools > Understand v4. The results of that analysis includes the issue below. > Issue: > Sockets are low level resources that must be explicitly released so > subsequent callers will have access to previously used sockets. In the file > RMIServerSocketFactoryImpl.java on lines 15-16 a socket is acquired and > eventually returned to the caller on line 18. > If an exception is thrown by the code on line 17 the socket acquired on lines > 15-16 will not be released for subsequent reuse. > RMIServerSocketFactoryImpl.java, lines 13-19: > {code:java} > 13 public ServerSocket createServerSocket(final int pPort) throws IOException > 14 { > 15 ServerSocket socket = ServerSocketFactory.getDefault() > 16 .createServerSocket(pPort, 0, > InetAddress.getLoopbackAddress()); > 17 socket.setReuseAddress(true); > 18 return socket; > 19 } > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (CASSANDRA-12331) Unreleased Resource: Sockets
[ https://issues.apache.org/jira/browse/CASSANDRA-12331?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Arunkumar M updated CASSANDRA-12331: Labels: easyfix newbie patch (was: ) Status: Patch Available (was: Open) https://github.com/arun-mk/cassandra/commit/ab76c29a7a4e884f515b4438a3f8feb5877a95d6 > Unreleased Resource: Sockets > > > Key: CASSANDRA-12331 > URL: https://issues.apache.org/jira/browse/CASSANDRA-12331 > Project: Cassandra > Issue Type: Sub-task >Reporter: Eduardo Aguinaga > Labels: newbie, patch, easyfix > Attachments: 12331-3.0.txt > > > Overview: > In May through June of 2016 a static analysis was performed on version 3.0.5 > of the Cassandra source code. The analysis included an automated analysis > using HP Fortify v4.21 SCA and a manual analysis utilizing SciTools > Understand v4. The results of that analysis includes the issue below. > Issue: > Sockets are low level resources that must be explicitly released so > subsequent callers will have access to previously used sockets. In the file > RMIServerSocketFactoryImpl.java on lines 15-16 a socket is acquired and > eventually returned to the caller on line 18. > If an exception is thrown by the code on line 17 the socket acquired on lines > 15-16 will not be released for subsequent reuse. > RMIServerSocketFactoryImpl.java, lines 13-19: > {code:java} > 13 public ServerSocket createServerSocket(final int pPort) throws IOException > 14 { > 15 ServerSocket socket = ServerSocketFactory.getDefault() > 16 .createServerSocket(pPort, 0, > InetAddress.getLoopbackAddress()); > 17 socket.setReuseAddress(true); > 18 return socket; > 19 } > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (CASSANDRA-12331) Unreleased Resource: Sockets
[ https://issues.apache.org/jira/browse/CASSANDRA-12331?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Arunkumar M updated CASSANDRA-12331: Attachment: 12331-3.0.txt Patch attached Github: https://github.com/arun-mk/cassandra/commit/ab76c29a7a4e884f515b4438a3f8feb5877a95d6 > Unreleased Resource: Sockets > > > Key: CASSANDRA-12331 > URL: https://issues.apache.org/jira/browse/CASSANDRA-12331 > Project: Cassandra > Issue Type: Sub-task >Reporter: Eduardo Aguinaga > Attachments: 12331-3.0.txt > > > Overview: > In May through June of 2016 a static analysis was performed on version 3.0.5 > of the Cassandra source code. The analysis included an automated analysis > using HP Fortify v4.21 SCA and a manual analysis utilizing SciTools > Understand v4. The results of that analysis includes the issue below. > Issue: > Sockets are low level resources that must be explicitly released so > subsequent callers will have access to previously used sockets. In the file > RMIServerSocketFactoryImpl.java on lines 15-16 a socket is acquired and > eventually returned to the caller on line 18. > If an exception is thrown by the code on line 17 the socket acquired on lines > 15-16 will not be released for subsequent reuse. > RMIServerSocketFactoryImpl.java, lines 13-19: > {code:java} > 13 public ServerSocket createServerSocket(final int pPort) throws IOException > 14 { > 15 ServerSocket socket = ServerSocketFactory.getDefault() > 16 .createServerSocket(pPort, 0, > InetAddress.getLoopbackAddress()); > 17 socket.setReuseAddress(true); > 18 return socket; > 19 } > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)