Re: findbugs

2012-11-05 Thread Radim Kolar

Dne 30.7.2012 16:47, Edward Capriolo napsal(a):

I am sure no one would have an issue with an optional findbugs target.

https://issues.apache.org/jira/browse/CASSANDRA-4891
here you have optional findbugs target.


Re: findbugs

2012-07-30 Thread Jonathan Ellis
I don't think there is much value in integrating it into the build
process, since there is a fairly high rate of false positives.
Intermittently running it manually could be valuable, and we have done
this in the past.

On Mon, Jul 30, 2012 at 9:32 AM, Radim Kolar h...@filez.com wrote:
 was any decision about findbugs made? you do not consider code style
 recommended by findbugs as good practice which should be followed?

 I can submit few findbugs patches, but it will probably turns into flamewar
 WE vs FINDBUGS like there:
 https://issues.apache.org/jira/browse/HADOOP-8619

 findbugs problems are pretty easy to fix and there are just 70 of them, it
 could be done in two days.

 I do not care about findbugs+cas-dev issue much because i need to fork
 cassandra anyway to get performance patches there. Its just matter of
 schedule for me if 1 should feed you fb patches before i fork it.



-- 
Jonathan Ellis
Project Chair, Apache Cassandra
co-founder of DataStax, the source for professional Cassandra support
http://www.datastax.com


Re: findbugs

2012-07-30 Thread Edward Capriolo
I am sure no one would have an issue with an optional findbugs target.

On Mon, Jul 30, 2012 at 10:32 AM, Radim Kolar h...@filez.com wrote:
 was any decision about findbugs made? you do not consider code style
 recommended by findbugs as good practice which should be followed?

 I can submit few findbugs patches, but it will probably turns into flamewar
 WE vs FINDBUGS like there:
 https://issues.apache.org/jira/browse/HADOOP-8619

 findbugs problems are pretty easy to fix and there are just 70 of them, it
 could be done in two days.

 I do not care about findbugs+cas-dev issue much because i need to fork
 cassandra anyway to get performance patches there. Its just matter of
 schedule for me if 1 should feed you fb patches before i fork it.


Re: findbugs

2012-07-30 Thread Jonathan Ellis
Is Jenkins smart enough to be able to say, I know we had X findbugs
warnings previously, which are known to be false positives, but now
there are X+1 ?

On Mon, Jul 30, 2012 at 9:47 AM, Edward Capriolo edlinuxg...@gmail.com wrote:
 I am sure no one would have an issue with an optional findbugs target.

 On Mon, Jul 30, 2012 at 10:32 AM, Radim Kolar h...@filez.com wrote:
 was any decision about findbugs made? you do not consider code style
 recommended by findbugs as good practice which should be followed?

 I can submit few findbugs patches, but it will probably turns into flamewar
 WE vs FINDBUGS like there:
 https://issues.apache.org/jira/browse/HADOOP-8619

 findbugs problems are pretty easy to fix and there are just 70 of them, it
 could be done in two days.

 I do not care about findbugs+cas-dev issue much because i need to fork
 cassandra anyway to get performance patches there. Its just matter of
 schedule for me if 1 should feed you fb patches before i fork it.



-- 
Jonathan Ellis
Project Chair, Apache Cassandra
co-founder of DataStax, the source for professional Cassandra support
http://www.datastax.com


Re: findbugs

2012-07-30 Thread Brandon Williams
On Mon, Jul 30, 2012 at 9:52 AM, Jonathan Ellis jbel...@gmail.com wrote:
 Is Jenkins smart enough to be able to say, I know we had X findbugs
 warnings previously, which are known to be false positives, but now
 there are X+1 ?

In my experience, jenkins hasn't even been smart enough to build
cassandra in a couple of years.

-Brandon


Re: findbugs

2012-07-30 Thread Zoltan Farkas
Findbugs can be customized with a exclude filter to exclude from checking 
issues that produce a high number of false positives.

For the rest of false positives @suppresswarnings annotation can be used.

I suggest Understanding the issue Findbugs highlights before suppressing it, I 
did see devs being lazy and causing production outages...

There is no good reason for not running Findbugs as part of the build.

cheers.

--z

On Jul 30, 2012, at 10:53 AM, Brandon Williams dri...@gmail.com wrote:

 On Mon, Jul 30, 2012 at 9:52 AM, Jonathan Ellis jbel...@gmail.com wrote:
 Is Jenkins smart enough to be able to say, I know we had X findbugs
 warnings previously, which are known to be false positives, but now
 there are X+1 ?
 
 In my experience, jenkins hasn't even been smart enough to build
 cassandra in a couple of years.
 
 -Brandon


Re: findbugs

2012-07-30 Thread Radim Kolar
i am using maven to build cassandra. i didnt have in mind to contribute 
build system because you are not interested in maven. In maven you just 
call findbugs plugin, nothing special to contribute. I had in mind patch 
fixing various FB discovered problems. but because its difficult to post 
it as many JIRA tickets, it will not be much useful. Maybe post report 
to list?


you can create exlude list for FB with list of known false positives, 
its an xml file.

?xml version=1.0 encoding=UTF-8?
FindBugsFilter
Match
  Bug pattern=SWL_SLEEP_WITH_LOCK_HELD /
/Match
/FindBugsFilter


Re: findbugs

2012-07-30 Thread Radim Kolar

Dne 30.7.2012 16:52, Jonathan Ellis napsal(a):

Is Jenkins smart enough to be able to say, I know we had X findbugs
warnings previously, which are known to be false positives, but now
there are X+1 ?

yes. Look at hadoop project pre-commit check builds.


Re: findbugs

2012-07-23 Thread Radim Kolar

The line numbers here don't appear to match with trunk.

you are right, it was from old trunk 415 commits old. It was just demo 
of findbugs, for serious use developers should install findbugs maven 
plugin or eclipse plugin (preferred).


Re: findbugs

2012-07-23 Thread Zoltan Farkas
In general, I prefer integrating findbugs into the build process and fail the 
build if issues are found. I am a strong believer in this approach, increases 
the quality of the project significantly.

Enforcing coding style and complexity rules is one step further...

Cheers

--z

On Jul 23, 2012, at 3:39 AM, Radim Kolar h...@filez.com wrote:

 The line numbers here don't appear to match with trunk.
 
 you are right, it was from old trunk 415 commits old. It was just demo of 
 findbugs, for serious use developers should install findbugs maven plugin or 
 eclipse plugin (preferred).


Re: findbugs

2012-07-23 Thread Radim Kolar

Dne 23.7.2012 16:34, Zoltan Farkas napsal(a):

In general, I prefer integrating findbugs into the build process and fail the 
build if issues are found. I am a strong believer in this approach, increases 
the quality of the project significantly.
Thats true, i am currently in process of fixing findbugs discovered 
problems in my other project (120k lines). i was amazed how much bugs 
was left in the code even if we have quite good code coverage.


Re: findbugs

2012-07-22 Thread Jonathan Ellis
The line numbers here don't appear to match with trunk.

On Sun, Jul 22, 2012 at 9:36 AM, Radim Kolar h...@filez.com wrote:
 I used findbugs on cassandra and it returns 69 possible errors.

 most problematic part of code is CQL - lot of null pointer problems there

 some interesting errors:

 C:/apache-nutch/eclipse/cassandra/src/java/org/apache/cassandra/service/AntiEntropyService.java:916
 Condition.await() not in loop in
 org.apache.cassandra.service.AntiEntropyService$RepairSession$RepairJob.addTree(AntiEntropyService$TreeRequest,
 MerkleTree)

 C:/apache-nutch/eclipse/cassandra/src/java/org/apache/cassandra/service/StorageProxy.java:370
 Null passed for nonnull parameter of
 org.apache.cassandra.utils.UUIDGen.decompose(UUID) in
 org.apache.cassandra.service.StorageProxy$5.runMayThrow()

 C:/apache-nutch/eclipse/cassandra/src/java/org/apache/cassandra/db/compaction/CompactionManager.java:157
 org.apache.cassandra.db.compaction.CompactionManager$2.call() does not
 release lock on all paths

 C:/apache-nutch/eclipse/cassandra/src/java/org/apache/cassandra/db/compaction/CompactionManager.java:248
 org.apache.cassandra.db.compaction.CompactionManager$6.runMayThrow() does
 not release lock on all paths

 C:/apache-nutch/eclipse/cassandra/src/java/org/apache/cassandra/utils/SimpleCondition.java:34
 Monitor wait() called on a Condition in
 org.apache.cassandra.utils.SimpleCondition.await() ** important! **

 C:/apache-nutch/eclipse/cassandra/src/java/org/apache/cassandra/db/compaction/LeveledManifest.java:224
 Result of integer multiplication cast to long in
 org.apache.cassandra.db.compaction.LeveledManifest.maxBytesForLevel(int)




-- 
Jonathan Ellis
Project Chair, Apache Cassandra
co-founder of DataStax, the source for professional Cassandra support
http://www.datastax.com