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.