Issue Details (XML | Word | Printable)

Key: DERBY-2339
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Bernt M. Johnsen
Reporter: Ole Solberg
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Derby

org.apache.derbyTesting.functionTests.suites.All is extremely CPU intensive since ~svn 507489

Created: 15/Feb/07 06:56 AM   Updated: 30/Jun/09 03:55 PM
Return to search
Component/s: Network Client
Affects Version/s: 10.3.1.4
Fix Version/s: 10.3.1.4

Time Tracking:
Not Specified

File Attachments:
  Size
File Licensed for inclusion in ASF works derby-2339-v2.diff 2007-02-15 12:00 PM Bernt M. Johnsen 2 kB
File derby-2339-v2.diff 2007-02-15 11:59 AM Bernt M. Johnsen 2 kB
File Licensed for inclusion in ASF works derby-2339.diff 2007-02-15 11:56 AM Bernt M. Johnsen 2 kB
Environment: All
Issue Links:
Reference
 

Bug behavior facts: Regression
Resolution Date: 15/Feb/07 01:08 PM



 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Bernt M. Johnsen added a comment - 15/Feb/07 11:32 AM
Caused by a misinterpretion of the semantics of ClientThread. Fix available soon now.

Bernt M. Johnsen added a comment - 15/Feb/07 11:56 AM
Upluaded fix. Will commit as soon as derbyall *and* the Junit All suite is run.

Bernt M. Johnsen added a comment - 15/Feb/07 11:59 AM
V2: Silly typo in a comment in the first version......

Bernt M. Johnsen added a comment - 15/Feb/07 12:00 PM
... and with "Grant license....." ..... :-(

Bernt M. Johnsen added a comment - 15/Feb/07 01:08 PM
Committed revision 507920.
Fixed mistake introduced by the implementation of DERBY-2108


Daniel John Debrunner added a comment - 15/Feb/07 06:29 PM
It's really helpful for the community if you could describe what the mistake was and how it was fixed.
Might indicate that better comments are needed in some code.

Bernt M. Johnsen added a comment - 15/Feb/07 11:25 PM
Ok Dan. The original code was somewhat complex, few comments, had bad indentation (some lines with tabs and some with spaces), had nested ifs both with and without braces and used both break and return to exit the loop in run() (in this case, both had the same effect and terminated the thread). The changes I needed, made the code even more messy, so I decided to rewrite it. Due to the problems mentioned, I misinterpreted the original semantics. Lessons learned:
1) If the semantics is complex: Comment generoulsy
2) Use braces, especially important when if statements are nested (and layout is bad)
3) Use a proper and readable layout