Commit Graph

5 Commits

Author SHA1 Message Date
Yanwei Guo c9f9284521
hasbucket (#1618) 2020-08-13 08:56:05 -07:00
Yanwei Guo 0166004ef1
Another try to use hash.BucketSet for standard leader election mode (#1530)
* do not record for empty metric config

* Revert "do not record for empty metric config"

This reverts commit 539a5e4dbb.

* redo

* use local

* typo

* Update leaderelection/context.go

Co-authored-by: Matt Moore <mattmoor@vmware.com>

* merge another pr

* update dep

* Update hash/bucketer_test.go

Co-authored-by: Victor Agababov <vagababov@gmail.com>

* Update hash/bucketer_test.go

Co-authored-by: Victor Agababov <vagababov@gmail.com>

* output diff

* output diff

Co-authored-by: Matt Moore <mattmoor@vmware.com>
Co-authored-by: Victor Agababov <vagababov@gmail.com>
2020-07-21 14:02:54 -07:00
Victor Agababov 3ba0019af6
Add a new method to permit creation of buckets from the bucketset (#1500)
* Add a new method to permit creation of buckets from the bucketset

This is a natural factory.

* review
2020-07-15 13:32:33 -07:00
Yanwei Guo 258f5b86c2
Use hash.BucketSet for StatefulSet mode (#1481)
* do not record for empty metric config

* Revert "do not record for empty metric config"

This reverts commit 539a5e4dbb.

* use hash bucektset for statefulset mode

* add test

* address comments from victor

* use make
2020-07-14 12:18:19 -07:00
Victor Agababov b09a159e12
Add BucketSet type which implements consistent bucketing (#1477)
* Add BucketSet type which implements consistent bucketing

BucketSet permits mapping keys to buckets in a consistent manner, permitting us to use this type
in the HA applications. BucketSet implements the Bucket interface so it can be used in reconciler/leaderelection
pieces and has an additional method which returns the owner for the key. This is necessary in autoscaler
where requests need to be forwarded to an appropriate autoscaler.

* git mod stuff

* fixes

* nit

* two types for two thigns

* more tests
2020-07-12 20:16:12 -07:00