Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
WIP: Demonstration of potential memberlist optimizations.
This is to show posssible optimizations on the memberlist receive path. I believe both these are correct but I need to spend a little time more double checking. All unit tests pass with both these optimizations. 1) Remove Clone()-ing `ring.Desc` The state is cloned so that when the state is not changed, it is not put back into the kv structure. This is not necessary, as by definition, the state did not change. Additionally, there are no error paths where we depend in this cloning to be able to roll-back the state. 2) Remove the normalizing of the `Ingesters` map The costly part here is not normalizing the incoming update, but normalizing the currently held state, as this can be large. Instead of doing this, we should just ensure that when the state is updated, it is kept in "normalized" form. This might already be the case, but should be verified. Both these changes will significantly reduce GC load as both are in essence cloning the ingesters map, only for it to be thrown away shortly after.
- Loading branch information