Closed abitmore closed 5 years ago
One way to tackle this is to replace our bloom filter implementation with a counting bloom filter. An example (MIT licensed) is https://github.com/le1ca/bloomfilter/blob/master/inc/CountingBloomFilter.hpp.
With that in place, we can add a simple API method that calls the filter's delete method.
Note: counting bloom filters open up the possibility of false negatives. Cuckoo filters suffer the same problem. In short, you must have previously inserted an item in the filter in order to delete it without causing false negatives.
Update - another implementation: https://github.com/queertypes/boost-bloom-filters/blob/master/boost/bloom_filter/counting_bloom_filter.hpp
@sschiessl-bcp mentioned in https://github.com/bitshares/bitshares-core/issues/777#issuecomment-481675944:
Possible a
set_subscribe_behavior
that toggles the default subscription behavior (only subscribe if I add the optional parameter in every call withtrue
)
See PR #1731. @sschiessl-bcp
closed by the merge of https://github.com/bitshares/bitshares-core/pull/1731
Once
set_subscribe_callback
is called, when callingget_objects
and etc, the node will automatically subscribe the queried objects for the client. Sometimes it's not desired. Since it's hard to modify all other API's without breaking things, I think we can add aset_auto_subscription(bool)
API, so the clients can control whether to automatically subscribe on follow-up queries.By the way, I think the subscribing mechanism need an overhaul, see #777.