Add helper methods to do safe partition reassignments#26
Add helper methods to do safe partition reassignments#26wvanbergen wants to merge 3 commits intomasterfrom
Conversation
1061f83 to
d1296f0
Compare
There was a problem hiding this comment.
basic ruby question probably, but why do we have to convert to Sets here but get away with comparing things like replicas == replicas.uniq above? I assume these are all intended to be set operations basically.
There was a problem hiding this comment.
replicas.uniq will remove duplicate entries but leaves the order alone, which means that the equation holds if all the entries in the array are unique. We could also do Set.new(replicas).length == replicas.length to get the same result.
There was a problem hiding this comment.
Ah ok, I didn't realize uniq will preserve order. Makes sense.
d1296f0 to
06557f2
Compare
|
cc @eapache because you were interested in the reassignment problem as well. |
|
Hm, I forgot about nils. Is it worth building in a preference for filling in nils, before dropping replicas? Maybe adding the compact check will do most of that already. |
|
Dunno if the new stuff I committed to |
@kvs @mkobetic