Closed ryscheng closed 7 years ago
Golang implementation: https://github.com/bjarneh/bloomfilter
The current bloom filter seems to fail when running go test
in libpdb on the pipelined-pir
branch.
--- FAIL: TestGeneratePublish (0.02s)
panic: runtime error: integer divide by zero [recovered]
panic: runtime error: integer divide by zero
[signal 0x8 code=0x1 addr=0x53a444 pc=0x53a444]
goroutine 7 [running]:
panic(0x860c20, 0xc82000a100)
/usr/lib/go-1.6/src/runtime/panic.go:481 +0x3e6
testing.tRunner.func1(0xc82007a510)
/usr/lib/go-1.6/src/testing/testing.go:467 +0x192
panic(0x860c20, 0xc82000a100)
/usr/lib/go-1.6/src/runtime/panic.go:443 +0x4e9
github.com/ryscheng/pdb/bloom.(*BloomFilter).Add(0xc8200bb4c0, 0xc820039d7c, 0x14, 0x14, 0x1)
github.com/ryscheng/pdb/bloom/bloom.go:134 +0x114
github.com/ryscheng/pdb/libpdb.(*Topic).GeneratePublish(0xc820088280, 0xc820049e60, 0x1, 0xc82002b400, 0x400, 0x400, 0x0, 0x0, 0x0)
github.com/ryscheng/pdb/libpdb/topic.go:95 +0x4bc
github.com/ryscheng/pdb/libpdb.TestGeneratePublish(0xc82007a510)
github.com/ryscheng/pdb/libpdb/topic_test.go:55 +0x3ca
fixed in 99ca1d92be338454b3de7434052cae8df6956f87. the test wasn't making a correct WindowSize()
Bloom filter seems to be working fine.
http://blog.michaelschmatz.com/2016/04/11/how-to-write-a-bloom-filter-cpp/