Oh, BTW, please don't take this as a strong position against making the
code thread-safe. I am trying to understand the source of the desire for
change, and playing a bit of devil's advocate.
Gary
On Sun, Jul 2, 2023, 07:46 Gary Gregory wrote:
> The question I have is whether thread safety is
The question I have is whether thread safety is something you require here
or think is a feature people will be surprised is absent.
Sometimes extra bells and whistles make the code harder to maintain. Once
advertised as such, it may become quite hard to fix bugs or add new
features. I would consi
I do not think concurrent write usage is a general use case for the
filter. So this seems like a specialisation. If implementing it would
harm performance then I would be against it for the base
implementation.
For specialisation I would prefer the JDK pattern used for
Synchronized collections whi
I have been thinking about what it would take to make SimpleBloomFilter
thread safe. I think that the answer is to use a copy on write strategy
and a lock within all the merge methods.
However, this leaves the problem of the cardinality calculation. Currently
it is lazily performed and cached.