roaporl / solrmeter

Automatically exported from code.google.com/p/solrmeter

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Scheduling bug in ConstantOperationExecutorThread.java (with patch)

GoogleCodeExporter opened this issue · comments

What steps will reproduce the problem?

Using the constant executor, try to exceed 1000 queries per minute.  

What is the expected output? What do you see instead?
I expect to be able to exceed 1000 queries per minute.  Instead, it doesn't go 
beyond around 500.

What version of the product are you using? On what operating system?
Using svn trunk, revision 283, on a mac

Please provide any additional information below.
This is happening because of a bug in ConstantOperationExecutorThread.java.  
The executeOperation() method calls Thread.run() instead of Thread.start(), 
resulting in a "fixed delay" style scheduling rather than "fixed period" 
scheduling, meaning that actual queries per minute will never exceed 1 / 
(latency in minutes).  What's more, it should be using a thread pool that can 
recycle threads instead of creating a new one every time.  I have a patch with 
just such a fix.  See attachment.  


Original issue reported on code.google.com by black.ru...@gmail.com on 17 Jan 2012 at 5:59

Attachments:

Thanks for reporting the bug! Looks like it's a big one. Will take a look at it 
later.

Original comment by juan.gra...@gmail.com on 17 Jan 2012 at 6:09

This issue was closed by revision r285.

Original comment by tflo...@gmail.com on 19 Jan 2012 at 11:28

  • Changed state: Fixed
Thanks for finding and fixing this issue! I just committed it to the trunk

Original comment by tflo...@gmail.com on 19 Jan 2012 at 11:29

  • Changed state: Resolved
  • Added labels: Priority-High
  • Removed labels: Priority-Medium