You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@zookeeper.apache.org by "Flavio Paiva Junqueira (JIRA)" <ji...@apache.org> on 2009/04/09 17:41:13 UTC

[jira] Created: (ZOOKEEPER-373) One thread per bookie

One thread per bookie
---------------------

                 Key: ZOOKEEPER-373
                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-373
             Project: Zookeeper
          Issue Type: Improvement
          Components: contrib-bookkeeper
            Reporter: Flavio Paiva Junqueira


Currently, if a client is writing to multiple ledgers and these ledgers overlap on some bookie, there will be as many threads for such a bookie as the number of ledgers writing to it. Consequently, if a client writes to many ledgers simultaneously, it may end up with an undesirably large number of threads. I don't have a concrete proposal yet, but I suspect it is as simple as keeping an array of BookieHandle objects, one per bookie, and having each BookieHandle object shared by all ledgers.
 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (ZOOKEEPER-373) One thread per bookie

Posted by "Hudson (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/ZOOKEEPER-373?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12700663#action_12700663 ] 

Hudson commented on ZOOKEEPER-373:
----------------------------------

Integrated in ZooKeeper-trunk #284 (See [http://hudson.zones.apache.org/hudson/job/ZooKeeper-trunk/284/])
    . One thread per bookie (flavio via mahadev)


> One thread per bookie
> ---------------------
>
>                 Key: ZOOKEEPER-373
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-373
>             Project: Zookeeper
>          Issue Type: Improvement
>          Components: contrib-bookkeeper
>    Affects Versions: 3.1.1
>            Reporter: Flavio Paiva Junqueira
>            Assignee: Flavio Paiva Junqueira
>             Fix For: 3.2.0
>
>         Attachments: ZOOKEEPER-373.patch, ZOOKEEPER-373.patch, ZOOKEEPER-373.patch
>
>
> Currently, if a client is writing to multiple ledgers and these ledgers overlap on some bookie, there will be as many threads for such a bookie as the number of ledgers writing to it. Consequently, if a client writes to many ledgers simultaneously, it may end up with an undesirably large number of threads. I don't have a concrete proposal yet, but I suspect it is as simple as keeping an array of BookieHandle objects, one per bookie, and having each BookieHandle object shared by all ledgers.
>  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (ZOOKEEPER-373) One thread per bookie

Posted by "Mahadev konar (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/ZOOKEEPER-373?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mahadev konar updated ZOOKEEPER-373:
------------------------------------

      Resolution: Fixed
    Hadoop Flags: [Reviewed]
          Status: Resolved  (was: Patch Available)

I just commmitted this. thanks flavio!.

> One thread per bookie
> ---------------------
>
>                 Key: ZOOKEEPER-373
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-373
>             Project: Zookeeper
>          Issue Type: Improvement
>          Components: contrib-bookkeeper
>    Affects Versions: 3.1.1
>            Reporter: Flavio Paiva Junqueira
>            Assignee: Flavio Paiva Junqueira
>             Fix For: 3.2.0
>
>         Attachments: ZOOKEEPER-373.patch, ZOOKEEPER-373.patch, ZOOKEEPER-373.patch
>
>
> Currently, if a client is writing to multiple ledgers and these ledgers overlap on some bookie, there will be as many threads for such a bookie as the number of ledgers writing to it. Consequently, if a client writes to many ledgers simultaneously, it may end up with an undesirably large number of threads. I don't have a concrete proposal yet, but I suspect it is as simple as keeping an array of BookieHandle objects, one per bookie, and having each BookieHandle object shared by all ledgers.
>  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (ZOOKEEPER-373) One thread per bookie

Posted by "Flavio Paiva Junqueira (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/ZOOKEEPER-373?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Flavio Paiva Junqueira updated ZOOKEEPER-373:
---------------------------------------------

    Assignee: Flavio Paiva Junqueira

> One thread per bookie
> ---------------------
>
>                 Key: ZOOKEEPER-373
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-373
>             Project: Zookeeper
>          Issue Type: Improvement
>          Components: contrib-bookkeeper
>    Affects Versions: 3.1.1
>            Reporter: Flavio Paiva Junqueira
>            Assignee: Flavio Paiva Junqueira
>             Fix For: 3.2.0
>
>         Attachments: ZOOKEEPER-373.patch, ZOOKEEPER-373.patch
>
>
> Currently, if a client is writing to multiple ledgers and these ledgers overlap on some bookie, there will be as many threads for such a bookie as the number of ledgers writing to it. Consequently, if a client writes to many ledgers simultaneously, it may end up with an undesirably large number of threads. I don't have a concrete proposal yet, but I suspect it is as simple as keeping an array of BookieHandle objects, one per bookie, and having each BookieHandle object shared by all ledgers.
>  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (ZOOKEEPER-373) One thread per bookie

Posted by "Flavio Paiva Junqueira (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/ZOOKEEPER-373?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Flavio Paiva Junqueira updated ZOOKEEPER-373:
---------------------------------------------

    Status: Patch Available  (was: Open)

> One thread per bookie
> ---------------------
>
>                 Key: ZOOKEEPER-373
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-373
>             Project: Zookeeper
>          Issue Type: Improvement
>          Components: contrib-bookkeeper
>    Affects Versions: 3.1.1
>            Reporter: Flavio Paiva Junqueira
>            Assignee: Flavio Paiva Junqueira
>             Fix For: 3.2.0
>
>         Attachments: ZOOKEEPER-373.patch, ZOOKEEPER-373.patch, ZOOKEEPER-373.patch
>
>
> Currently, if a client is writing to multiple ledgers and these ledgers overlap on some bookie, there will be as many threads for such a bookie as the number of ledgers writing to it. Consequently, if a client writes to many ledgers simultaneously, it may end up with an undesirably large number of threads. I don't have a concrete proposal yet, but I suspect it is as simple as keeping an array of BookieHandle objects, one per bookie, and having each BookieHandle object shared by all ledgers.
>  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (ZOOKEEPER-373) One thread per bookie

Posted by "Flavio Paiva Junqueira (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/ZOOKEEPER-373?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12699341#action_12699341 ] 

Flavio Paiva Junqueira commented on ZOOKEEPER-373:
--------------------------------------------------

With this patch, a BookKeeper client has only one BookieHandle per Bookie. With the current trunk implementation, if a client creates writes to two ledgers simultaneously and they share a bookie, there will be two BookieHandle threads. This is not a problem for applications like the namenode that writes to one ledger at a time, but there might be applications that require clients writing to several ledgers concurrently. 

More specifically, with this patch, a BookKeeper object keeps a list of BookieHandle objects. When creating a ledger, LedgerHandle checks if there is a BookieHandle object available before instantiating BookieHandle through a call to BookKeeper::getBookieHandle. We then have to make sure that a BookieHandle keeps running as long as there is at least one reference to it. 

  

> One thread per bookie
> ---------------------
>
>                 Key: ZOOKEEPER-373
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-373
>             Project: Zookeeper
>          Issue Type: Improvement
>          Components: contrib-bookkeeper
>    Affects Versions: 3.1.1
>            Reporter: Flavio Paiva Junqueira
>            Assignee: Flavio Paiva Junqueira
>             Fix For: 3.2.0
>
>         Attachments: ZOOKEEPER-373.patch, ZOOKEEPER-373.patch
>
>
> Currently, if a client is writing to multiple ledgers and these ledgers overlap on some bookie, there will be as many threads for such a bookie as the number of ledgers writing to it. Consequently, if a client writes to many ledgers simultaneously, it may end up with an undesirably large number of threads. I don't have a concrete proposal yet, but I suspect it is as simple as keeping an array of BookieHandle objects, one per bookie, and having each BookieHandle object shared by all ledgers.
>  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (ZOOKEEPER-373) One thread per bookie

Posted by "Flavio Paiva Junqueira (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/ZOOKEEPER-373?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12699590#action_12699590 ] 

Flavio Paiva Junqueira commented on ZOOKEEPER-373:
--------------------------------------------------

> the one trick piece is the refCounting. specifically decrementing 
> the counter. in close when you decrement the counter and then 
> do the remove you aren't in a synchronized method, so you have 
> a race condition.

That was a great catch. I have initially thought that making the counter volatile was sufficient given the code paths that we have, but I realized after your comment that this is not true, so I have re-structured a bit so that we don't have a race condition. 

I haven't made BookieHandle::incRefCount and BookieHandle::halt synchronized because they are currently only called from BookKeeper::getBookieHandle and BookKeeper::haltBookieHandles, respectively, and these two last methods are synchronized. To make it safe for future versions of BookKeeper, we could make the two BookieHandle methods synchronized, but if I'm not mistaken, I don't think they have to be in the way I have implemented. It would be great if you could double-check. 

> one other place that could be problematic is the mac object. 
> isn't it possible that two different threads going to two different
> ledgers use the same mac?

This one doesn't seem to be a problem because each mac object is a variable of either BookieHandle (for writes) or BookieClient (for reads), and each of these classes extends Thread. Finally, the methods that use the mac objects are called from the Threads that own them. 


> One thread per bookie
> ---------------------
>
>                 Key: ZOOKEEPER-373
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-373
>             Project: Zookeeper
>          Issue Type: Improvement
>          Components: contrib-bookkeeper
>    Affects Versions: 3.1.1
>            Reporter: Flavio Paiva Junqueira
>            Assignee: Flavio Paiva Junqueira
>             Fix For: 3.2.0
>
>         Attachments: ZOOKEEPER-373.patch, ZOOKEEPER-373.patch, ZOOKEEPER-373.patch
>
>
> Currently, if a client is writing to multiple ledgers and these ledgers overlap on some bookie, there will be as many threads for such a bookie as the number of ledgers writing to it. Consequently, if a client writes to many ledgers simultaneously, it may end up with an undesirably large number of threads. I don't have a concrete proposal yet, but I suspect it is as simple as keeping an array of BookieHandle objects, one per bookie, and having each BookieHandle object shared by all ledgers.
>  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (ZOOKEEPER-373) One thread per bookie

Posted by "Hadoop QA (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/ZOOKEEPER-373?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12699828#action_12699828 ] 

Hadoop QA commented on ZOOKEEPER-373:
-------------------------------------

+1 overall.  Here are the results of testing the latest attachment 
  http://issues.apache.org/jira/secure/attachment/12405634/ZOOKEEPER-373.patch
  against trunk revision 764673.

    +1 @author.  The patch does not contain any @author tags.

    +1 tests included.  The patch appears to include 3 new or modified tests.

    +1 javadoc.  The javadoc tool did not generate any warning messages.

    +1 javac.  The applied patch does not increase the total number of javac compiler warnings.

    +1 findbugs.  The patch does not introduce any new Findbugs warnings.

    +1 release audit.  The applied patch does not increase the total number of release audit warnings.

    +1 core tests.  The patch passed core unit tests.

    +1 contrib tests.  The patch passed contrib unit tests.

Test results: http://hudson.zones.apache.org/hudson/job/Zookeeper-Patch-vesta.apache.org/34/testReport/
Findbugs warnings: http://hudson.zones.apache.org/hudson/job/Zookeeper-Patch-vesta.apache.org/34/artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
Console output: http://hudson.zones.apache.org/hudson/job/Zookeeper-Patch-vesta.apache.org/34/console

This message is automatically generated.

> One thread per bookie
> ---------------------
>
>                 Key: ZOOKEEPER-373
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-373
>             Project: Zookeeper
>          Issue Type: Improvement
>          Components: contrib-bookkeeper
>    Affects Versions: 3.1.1
>            Reporter: Flavio Paiva Junqueira
>            Assignee: Flavio Paiva Junqueira
>             Fix For: 3.2.0
>
>         Attachments: ZOOKEEPER-373.patch, ZOOKEEPER-373.patch, ZOOKEEPER-373.patch
>
>
> Currently, if a client is writing to multiple ledgers and these ledgers overlap on some bookie, there will be as many threads for such a bookie as the number of ledgers writing to it. Consequently, if a client writes to many ledgers simultaneously, it may end up with an undesirably large number of threads. I don't have a concrete proposal yet, but I suspect it is as simple as keeping an array of BookieHandle objects, one per bookie, and having each BookieHandle object shared by all ledgers.
>  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (ZOOKEEPER-373) One thread per bookie

Posted by "Flavio Paiva Junqueira (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/ZOOKEEPER-373?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Flavio Paiva Junqueira updated ZOOKEEPER-373:
---------------------------------------------

        Fix Version/s: 3.2.0
    Affects Version/s: 3.1.1
               Status: Patch Available  (was: Open)

> One thread per bookie
> ---------------------
>
>                 Key: ZOOKEEPER-373
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-373
>             Project: Zookeeper
>          Issue Type: Improvement
>          Components: contrib-bookkeeper
>    Affects Versions: 3.1.1
>            Reporter: Flavio Paiva Junqueira
>            Assignee: Flavio Paiva Junqueira
>             Fix For: 3.2.0
>
>         Attachments: ZOOKEEPER-373.patch, ZOOKEEPER-373.patch
>
>
> Currently, if a client is writing to multiple ledgers and these ledgers overlap on some bookie, there will be as many threads for such a bookie as the number of ledgers writing to it. Consequently, if a client writes to many ledgers simultaneously, it may end up with an undesirably large number of threads. I don't have a concrete proposal yet, but I suspect it is as simple as keeping an array of BookieHandle objects, one per bookie, and having each BookieHandle object shared by all ledgers.
>  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (ZOOKEEPER-373) One thread per bookie

Posted by "Flavio Paiva Junqueira (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/ZOOKEEPER-373?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Flavio Paiva Junqueira updated ZOOKEEPER-373:
---------------------------------------------

    Attachment: ZOOKEEPER-373.patch

Includes a new unit test.

> One thread per bookie
> ---------------------
>
>                 Key: ZOOKEEPER-373
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-373
>             Project: Zookeeper
>          Issue Type: Improvement
>          Components: contrib-bookkeeper
>            Reporter: Flavio Paiva Junqueira
>         Attachments: ZOOKEEPER-373.patch, ZOOKEEPER-373.patch
>
>
> Currently, if a client is writing to multiple ledgers and these ledgers overlap on some bookie, there will be as many threads for such a bookie as the number of ledgers writing to it. Consequently, if a client writes to many ledgers simultaneously, it may end up with an undesirably large number of threads. I don't have a concrete proposal yet, but I suspect it is as simple as keeping an array of BookieHandle objects, one per bookie, and having each BookieHandle object shared by all ledgers.
>  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (ZOOKEEPER-373) One thread per bookie

Posted by "Flavio Paiva Junqueira (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/ZOOKEEPER-373?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Flavio Paiva Junqueira updated ZOOKEEPER-373:
---------------------------------------------

    Attachment: ZOOKEEPER-373.patch

> One thread per bookie
> ---------------------
>
>                 Key: ZOOKEEPER-373
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-373
>             Project: Zookeeper
>          Issue Type: Improvement
>          Components: contrib-bookkeeper
>    Affects Versions: 3.1.1
>            Reporter: Flavio Paiva Junqueira
>            Assignee: Flavio Paiva Junqueira
>             Fix For: 3.2.0
>
>         Attachments: ZOOKEEPER-373.patch, ZOOKEEPER-373.patch, ZOOKEEPER-373.patch
>
>
> Currently, if a client is writing to multiple ledgers and these ledgers overlap on some bookie, there will be as many threads for such a bookie as the number of ledgers writing to it. Consequently, if a client writes to many ledgers simultaneously, it may end up with an undesirably large number of threads. I don't have a concrete proposal yet, but I suspect it is as simple as keeping an array of BookieHandle objects, one per bookie, and having each BookieHandle object shared by all ledgers.
>  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (ZOOKEEPER-373) One thread per bookie

Posted by "Benjamin Reed (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/ZOOKEEPER-373?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12699778#action_12699778 ] 

Benjamin Reed commented on ZOOKEEPER-373:
-----------------------------------------

+1 looks good

> One thread per bookie
> ---------------------
>
>                 Key: ZOOKEEPER-373
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-373
>             Project: Zookeeper
>          Issue Type: Improvement
>          Components: contrib-bookkeeper
>    Affects Versions: 3.1.1
>            Reporter: Flavio Paiva Junqueira
>            Assignee: Flavio Paiva Junqueira
>             Fix For: 3.2.0
>
>         Attachments: ZOOKEEPER-373.patch, ZOOKEEPER-373.patch, ZOOKEEPER-373.patch
>
>
> Currently, if a client is writing to multiple ledgers and these ledgers overlap on some bookie, there will be as many threads for such a bookie as the number of ledgers writing to it. Consequently, if a client writes to many ledgers simultaneously, it may end up with an undesirably large number of threads. I don't have a concrete proposal yet, but I suspect it is as simple as keeping an array of BookieHandle objects, one per bookie, and having each BookieHandle object shared by all ledgers.
>  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (ZOOKEEPER-373) One thread per bookie

Posted by "Flavio Paiva Junqueira (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/ZOOKEEPER-373?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Flavio Paiva Junqueira updated ZOOKEEPER-373:
---------------------------------------------

    Attachment: ZOOKEEPER-373.patch

Preliminary patch. It does not contain a unit test for this issue.

> One thread per bookie
> ---------------------
>
>                 Key: ZOOKEEPER-373
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-373
>             Project: Zookeeper
>          Issue Type: Improvement
>          Components: contrib-bookkeeper
>            Reporter: Flavio Paiva Junqueira
>         Attachments: ZOOKEEPER-373.patch
>
>
> Currently, if a client is writing to multiple ledgers and these ledgers overlap on some bookie, there will be as many threads for such a bookie as the number of ledgers writing to it. Consequently, if a client writes to many ledgers simultaneously, it may end up with an undesirably large number of threads. I don't have a concrete proposal yet, but I suspect it is as simple as keeping an array of BookieHandle objects, one per bookie, and having each BookieHandle object shared by all ledgers.
>  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (ZOOKEEPER-373) One thread per bookie

Posted by "Benjamin Reed (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/ZOOKEEPER-373?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12699426#action_12699426 ] 

Benjamin Reed commented on ZOOKEEPER-373:
-----------------------------------------

looks good. the one trick piece is the refCounting. specifically decrementing the counter. in close when you decrement the counter and then do the remove you aren't in a synchronized method, so you have a race condition. one other place that could be problematic is the mac object. isn't it possible that two different threads going to two different ledgers use the same mac?

> One thread per bookie
> ---------------------
>
>                 Key: ZOOKEEPER-373
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-373
>             Project: Zookeeper
>          Issue Type: Improvement
>          Components: contrib-bookkeeper
>    Affects Versions: 3.1.1
>            Reporter: Flavio Paiva Junqueira
>            Assignee: Flavio Paiva Junqueira
>             Fix For: 3.2.0
>
>         Attachments: ZOOKEEPER-373.patch, ZOOKEEPER-373.patch
>
>
> Currently, if a client is writing to multiple ledgers and these ledgers overlap on some bookie, there will be as many threads for such a bookie as the number of ledgers writing to it. Consequently, if a client writes to many ledgers simultaneously, it may end up with an undesirably large number of threads. I don't have a concrete proposal yet, but I suspect it is as simple as keeping an array of BookieHandle objects, one per bookie, and having each BookieHandle object shared by all ledgers.
>  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (ZOOKEEPER-373) One thread per bookie

Posted by "Mahadev konar (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/ZOOKEEPER-373?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12699308#action_12699308 ] 

Mahadev konar commented on ZOOKEEPER-373:
-----------------------------------------

flavio,
 can you comment on the jira, what specific changes you made?

> One thread per bookie
> ---------------------
>
>                 Key: ZOOKEEPER-373
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-373
>             Project: Zookeeper
>          Issue Type: Improvement
>          Components: contrib-bookkeeper
>    Affects Versions: 3.1.1
>            Reporter: Flavio Paiva Junqueira
>            Assignee: Flavio Paiva Junqueira
>             Fix For: 3.2.0
>
>         Attachments: ZOOKEEPER-373.patch, ZOOKEEPER-373.patch
>
>
> Currently, if a client is writing to multiple ledgers and these ledgers overlap on some bookie, there will be as many threads for such a bookie as the number of ledgers writing to it. Consequently, if a client writes to many ledgers simultaneously, it may end up with an undesirably large number of threads. I don't have a concrete proposal yet, but I suspect it is as simple as keeping an array of BookieHandle objects, one per bookie, and having each BookieHandle object shared by all ledgers.
>  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (ZOOKEEPER-373) One thread per bookie

Posted by "Flavio Paiva Junqueira (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/ZOOKEEPER-373?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Flavio Paiva Junqueira updated ZOOKEEPER-373:
---------------------------------------------

    Status: Open  (was: Patch Available)

Canceling patch until we sort out all raised issues. 

> One thread per bookie
> ---------------------
>
>                 Key: ZOOKEEPER-373
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-373
>             Project: Zookeeper
>          Issue Type: Improvement
>          Components: contrib-bookkeeper
>    Affects Versions: 3.1.1
>            Reporter: Flavio Paiva Junqueira
>            Assignee: Flavio Paiva Junqueira
>             Fix For: 3.2.0
>
>         Attachments: ZOOKEEPER-373.patch, ZOOKEEPER-373.patch
>
>
> Currently, if a client is writing to multiple ledgers and these ledgers overlap on some bookie, there will be as many threads for such a bookie as the number of ledgers writing to it. Consequently, if a client writes to many ledgers simultaneously, it may end up with an undesirably large number of threads. I don't have a concrete proposal yet, but I suspect it is as simple as keeping an array of BookieHandle objects, one per bookie, and having each BookieHandle object shared by all ledgers.
>  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.