Opened 7 years ago

Closed 6 years ago

#834 closed defect (not a bug)

Locking issue in DecayingBloomFilter

Reported by: Zlatin Balevsky Owned by:
Priority: minor Milestone:
Component: api/utils Version: 0.9.4
Keywords: locking Cc: zab@…
Parent Tickets: Sensitive: no

Description

In DecayingBloomFilter: add() → (acquires read lock) → locked_add → BloomSHA1.locked_add

But the latter does not have any kind of locking. So the internal state of BloomSHA1 is modified under a read lock.

Subtickets

Change History (2)

comment:1 Changed 7 years ago by zzz

I think it's right as-is. To clarify:

In DBF, the write lock is taken only when switching the double buffers. The read lock is taken for "normal" reads and writes.

In BloomSHA1, there's javadocs at the top that explain how it was rewritten to be thread-safe. The locked_xxx method names in there are leftover from before the rewrite.

comment:2 Changed 6 years ago by zzz

Resolution: not a bug
Status: newclosed
Note: See TracTickets for help on using tickets.