Github user lvfangmin commented on the issue:
https://github.com/apache/zookeeper/pull/590
There is a PR in the Jira few years ago, which uses BitMap as well, but it
sacrificed the performance on triggering watches, this patch improved that and
uses lazy clean up for cleaning those watchers who has closed the session.---
