Skip to content

Add configurable bloom filters#644

Merged
annanay25 merged 20 commits intografana:mainfrom
annanay25:cfgble-bloom
May 20, 2021
Merged

Add configurable bloom filters#644
annanay25 merged 20 commits intografana:mainfrom
annanay25:cfgble-bloom

Conversation

@annanay25
Copy link
Copy Markdown
Contributor

@annanay25 annanay25 commented Apr 12, 2021

Signed-off-by: Annanay annanayagarwal@gmail.com

What this PR does:
Provides a way to shard out the bloom filter based on the false positive rate and shard size provided.

Which issue(s) this PR fixes:
Fixes #419

Checklist

  • Tests updated
  • NA Documentation added
  • CHANGELOG.md updated - the order of entries should be [CHANGE], [FEATURE], [ENHANCEMENT], [BUGFIX]

Signed-off-by: Annanay <annanayagarwal@gmail.com>
Comment thread modules/storage/config.go Outdated
Comment thread tempodb/encoding/common/bloom.go
annanay25 added 3 commits May 12, 2021 20:40
Signed-off-by: Annanay <annanayagarwal@gmail.com>
Signed-off-by: Annanay <annanayagarwal@gmail.com>
Signed-off-by: Annanay <annanayagarwal@gmail.com>
Comment thread tempodb/encoding/common/bloom.go
Comment thread tempodb/encoding/common/bloom.go Outdated
Comment thread tempodb/encoding/common/bloom_test.go
annanay25 added 2 commits May 17, 2021 12:30
Signed-off-by: Annanay <annanayagarwal@gmail.com>
Signed-off-by: Annanay <annanayagarwal@gmail.com>
@annanay25 annanay25 marked this pull request as ready for review May 17, 2021 07:04
Signed-off-by: Annanay <annanayagarwal@gmail.com>
@annanay25
Copy link
Copy Markdown
Contributor Author

annanay25 commented May 17, 2021

something to note - with the following parameters:

bloomFP:          0.05,
shardSize:        250*1024,
estimatedObjects: 10_000_000,

the package creates 244 shards. we'll just have that many bloom files in object storage

Signed-off-by: Annanay <annanayagarwal@gmail.com>
Comment thread tempodb/encoding/common/bloom.go Outdated
Copy link
Copy Markdown
Collaborator

@joe-elliott joe-elliott left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some thoughts.

I didn't dig super hard on the tests, but I think testStreamingBlockToBackendBlock will test that the bloom filters are functioning correctly.

the package creates 244 shards. we'll just have that many bloom files in object storage
Yeah, I think this will be ok :). If not we're about to find out.

Comment thread tempodb/encoding/common/bloom.go
Comment thread tempodb/encoding/block.go
Comment thread tempodb/encoding/streaming_block_test.go Outdated
Comment thread tempodb/backend/block_meta.go Outdated
Signed-off-by: Annanay <annanayagarwal@gmail.com>
Copy link
Copy Markdown
Contributor

@mdisibio mdisibio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work, this is much smoother than expected! Left a few comments.

Comment thread modules/storage/config.go Outdated
Comment thread tempodb/encoding/common/bloom.go
Comment thread tempodb/encoding/common/bloom.go Outdated
Comment thread tempodb/encoding/config.go Outdated
annanay25 added 10 commits May 19, 2021 13:53
Signed-off-by: Annanay <annanayagarwal@gmail.com>
Signed-off-by: Annanay <annanayagarwal@gmail.com>
Signed-off-by: Annanay <annanayagarwal@gmail.com>
Signed-off-by: Annanay <annanayagarwal@gmail.com>
Signed-off-by: Annanay <annanayagarwal@gmail.com>
Signed-off-by: Annanay <annanayagarwal@gmail.com>
Signed-off-by: Annanay <annanayagarwal@gmail.com>
Signed-off-by: Annanay <annanayagarwal@gmail.com>
Signed-off-by: Annanay <annanayagarwal@gmail.com>
Signed-off-by: Annanay <annanayagarwal@gmail.com>
Copy link
Copy Markdown
Collaborator

@joe-elliott joe-elliott left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Two final thoughts and then I'm good. @mdisibio anything else?

Comment thread tempodb/wal/append_block.go Outdated
Comment thread tempodb/encoding/common/bloom.go
@mdisibio
Copy link
Copy Markdown
Contributor

LGTM after reducing maxShardCount.

Signed-off-by: Annanay <annanayagarwal@gmail.com>
@annanay25 annanay25 merged commit c61b678 into grafana:main May 20, 2021
@annanay25 annanay25 deleted the cfgble-bloom branch May 20, 2021 16:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Make Bloom Filter Sharding Configurable

3 participants