Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding util/shard and util/yolobuf #36

Closed
wants to merge 7 commits into from

Commits on Sep 8, 2021

  1. Shuffle-sharding support in Ruler. (#3235)

    * Reconfigure ruler in docker compose.
    
    Two rulers are started now, they use S3 for storing rules, and use
    sharding.
    
    Signed-off-by: Peter Štibraný <peter.stibrany@grafana.com>
    
    * Extracted different sharding strategies into methods.
    
    Signed-off-by: Peter Štibraný <peter.stibrany@grafana.com>
    
    * Added support for shuffle sharding to ruler.go
    
    Signed-off-by: Peter Štibraný <peter.stibrany@grafana.com>
    
    * Sharding tests.
    
    Signed-off-by: Peter Štibraný <peter.stibrany@grafana.com>
    
    * Add tests for shuffle sharding strategy.
    
    Signed-off-by: Peter Štibraný <peter.stibrany@grafana.com>
    
    * Removed configstore.
    
    Signed-off-by: Peter Štibraný <peter.stibrany@grafana.com>
    
    * Return error if "common prefix" without supplied prefix is returned.
    
    Signed-off-by: Peter Štibraný <peter.stibrany@grafana.com>
    
    * Changed replication strategy used by ruler.
    
    Ruler must be active to receive any rules now.
    
    Signed-off-by: Peter Štibraný <peter.stibrany@grafana.com>
    
    * Another test.
    
    Signed-off-by: Peter Štibraný <peter.stibrany@grafana.com>
    
    * Load rules for users concurrently when using shuffle sharding.
    
    Signed-off-by: Peter Štibraný <peter.stibrany@grafana.com>
    
    * Removed extra method LoadRuleGroupsForUser, and replaced with LoadRuleGroupsForUserAndNamespace.
    
    Signed-off-by: Peter Štibraný <peter.stibrany@grafana.com>
    
    * Comment.
    
    Signed-off-by: Peter Štibraný <peter.stibrany@grafana.com>
    
    * Fix comments after rename.
    
    Signed-off-by: Peter Štibraný <peter.stibrany@grafana.com>
    
    * Lint comments.
    
    Signed-off-by: Peter Štibraný <peter.stibrany@grafana.com>
    
    * Added ruler sync on ring change.
    
    Signed-off-by: Peter Štibraný <peter.stibrany@grafana.com>
    
    * Move ShuffleShardSeed to util package.
    
    Signed-off-by: Peter Štibraný <peter.stibrany@grafana.com>
    
    * Added log message.
    
    Signed-off-by: Peter Štibraný <peter.stibrany@grafana.com>
    
    * Fix compilation of tests.
    
    Signed-off-by: Peter Štibraný <peter.stibrany@grafana.com>
    
    * Create user-manager even if files even haven't changed.
    
    During resharding, user can easily "jump" between rulers.
    When it "jumps" back, previously manager wouldn't be second time.
    
    Signed-off-by: Peter Štibraný <peter.stibrany@grafana.com>
    
    * Unregister user registry when removing ruler manager.
    
    Signed-off-by: Peter Štibraný <peter.stibrany@grafana.com>
    
    * Added short paragraph about ruler shuffle sharding.
    
    Signed-off-by: Peter Štibraný <peter.stibrany@grafana.com>
    
    * Review feedback.
    
    Signed-off-by: Peter Štibraný <peter.stibrany@grafana.com>
    
    * Modified test, it now verifies expected rules for each ruler.
    
    Signed-off-by: Peter Štibraný <peter.stibrany@grafana.com>
    
    * Added test for bugfix in DefaultTenantManagerFactory.
    
    Signed-off-by: Peter Štibraný <peter.stibrany@grafana.com>
    
    * Added CHANGELOG.md
    
    Signed-off-by: Peter Štibraný <peter.stibrany@grafana.com>
    
    * Added test for Collect and DeleteUserRegistry.
    
    Signed-off-by: Peter Štibraný <peter.stibrany@grafana.com>
    
    * Clean white noise.
    
    Signed-off-by: Peter Štibraný <peter.stibrany@grafana.com>
    
    * Move comment about replication factor.
    
    Signed-off-by: Peter Štibraný <peter.stibrany@grafana.com>
    
    * Added comment about tokens setup.
    
    Signed-off-by: Peter Štibraný <peter.stibrany@grafana.com>
    
    * Fix compilation problem after master merge.
    
    Signed-off-by: Peter Štibraný <peter.stibrany@grafana.com>
    pstibrany authored and Tyler Reid committed Sep 8, 2021
    Configuration menu
    Copy the full SHA
    5ce7a52 View commit details
    Browse the repository at this point in the history
  2. Fixed shuffle sharding consistency when zone-awareness is enabled and…

    … the shard size is increased or instances in a new zone are added (#3299)
    
    * Fixed shuffle sharding consistency when zone-awareness is enabled and the shard size is increased or instances in a new zone are added
    
    Signed-off-by: Marco Pracucci <marco@pracucci.com>
    
    * Slightly more permissive deviance
    
    Signed-off-by: Marco Pracucci <marco@pracucci.com>
    
    * Cleaned up ring unit tests
    
    Signed-off-by: Marco Pracucci <marco@pracucci.com>
    
    * Use YoloBuf to reduce allocations in ShuffleShardSeed()
    
    Signed-off-by: Marco Pracucci <marco@pracucci.com>
    pracucci authored and Tyler Reid committed Sep 8, 2021
    Configuration menu
    Copy the full SHA
    16dcecf View commit details
    Browse the repository at this point in the history
  3. Fixed max global series per user/metric limit when shuffle sharding i…

    …s enabled (#3369)
    
    * Fixed max global series per user/metric limit when shuffle sharding is enabled
    
    Signed-off-by: Marco Pracucci <marco@pracucci.com>
    
    * Clarified CHANGELOG
    
    Signed-off-by: Marco Pracucci <marco@pracucci.com>
    
    * Fixed global limits on shuffle sharding with zone-awareness
    
    Signed-off-by: Marco Pracucci <marco@pracucci.com>
    
    * Fixed integration test after rebase
    
    Signed-off-by: Marco Pracucci <marco@pracucci.com>
    
    * Remove unused flushTransferer in tests
    
    Signed-off-by: Marco Pracucci <marco@pracucci.com>
    
    * Use new constants in ruler pkg too
    
    Signed-off-by: Marco Pracucci <marco@pracucci.com>
    pracucci authored and Tyler Reid committed Sep 8, 2021
    Configuration menu
    Copy the full SHA
    c886cd8 View commit details
    Browse the repository at this point in the history

Commits on Sep 9, 2021

  1. Add util/shard, util/yolo

    Signed-off-by: Tyler Reid <tyler.reid@grafana.com>
    Tyler Reid committed Sep 9, 2021
    Configuration menu
    Copy the full SHA
    9c35f8a View commit details
    Browse the repository at this point in the history
  2. Move changelog message to follow my own rules

    Signed-off-by: Tyler Reid <tyler.reid@grafana.com>
    Tyler Reid committed Sep 9, 2021
    Configuration menu
    Copy the full SHA
    041d6a4 View commit details
    Browse the repository at this point in the history

Commits on Sep 10, 2021

  1. Merge remote-tracking branch 'upstream/main' into util-shard

    Signed-off-by: Tyler Reid <tyler.reid@grafana.com>
    Tyler Reid committed Sep 10, 2021
    Configuration menu
    Copy the full SHA
    9f87b62 View commit details
    Browse the repository at this point in the history
  2. Fix comment grammar

    Signed-off-by: Tyler Reid <tyler.reid@grafana.com>
    Tyler Reid committed Sep 10, 2021
    Configuration menu
    Copy the full SHA
    a2bd0ed View commit details
    Browse the repository at this point in the history