[
https://issues.apache.org/jira/browse/ZOOKEEPER-1312?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13161122#comment-13161122
]
Ted Dunning commented on ZOOKEEPER-1312:
----------------------------------------
{quote}
... then the janitor could use notifications to trigger updates to the info
files (also batching updates as Ted suggests).
{quote}
Yes. This is the second option I described, apparently poorly enough not to be
clear.
{quote}
The clients could even let the janitor know whether they cleaned up gracefully
or not through zk.
{quote}
That is a nice touch.
{quote}
Downside is you'd need more than one janitor if you wanted to elim that as a
spof.
{quote}
Yes. Yet another leader-election application. One cute trick to eliminate
herd effect is to have prospective leaders look at a count of candidates. If
that is big, then they can just create an ephemeral in a candidate directory,
but not actually become a candidate. If the number of candidates is relatively
small, then they can join the fray. Non-candidates could watch for leader
changes and reassess whether they should be a candidate whenever the leadership
changes. Periodic polling could be used by non-candidates to assess whether
there is any slippage going on and the polling can be adjusted based on the
number of non-candidates to guarantee that candidates will reappear quickly
without flooding ZK with polling queries.
But that is off topic.
Depending on the lifetime of the leases and the number of clients involved you
would also want to think about optimistic locking contention on the
comprehensive file. (ie have more than one).
> Add a "getChildrenWithStat" operation
> -------------------------------------
>
> Key: ZOOKEEPER-1312
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1312
> Project: ZooKeeper
> Issue Type: New Feature
> Reporter: Daniel Lord
> Labels: newbie
>
> It would be extremely useful to be able to have a "getChildrenWithStat"
> method. This method would behave exactly the same as getChildren but in
> addition to returning the list of all child znode names it would also return
> a Stat for each child. I'm sure there are quite a few use cases for this but
> it could save a lot of extra reads for my application.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira