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

Release v0.8.0 #198

Merged
merged 19 commits into from Dec 23, 2016
Merged

Release v0.8.0 #198

merged 19 commits into from Dec 23, 2016

Conversation

mennopruijssers
Copy link
Contributor

@mennopruijssers mennopruijssers commented Dec 21, 2016

This PR:

  • merges #dev into #master
  • updates CHANGES.md

thanodnl and others added 13 commits November 1, 2016 16:50
* implement basic self eviction

* mockery made me inline the interface, but now tests work again

* return active phase from transition call

* more gopher way of registering eviction hooks.

* handle double SIGINT to forcefully exit

* add mocks for evict hook for testing

* Add tests for basic flow of the self eviction.

* Implement the pro active pinging on self eviction.

* add test for forcefully pinging around.

* Add test for second invocation of self evict

* fix counting of successful pings and add assert that it is counted correctly.

* ping all targets in parallel

* Reuse util.Min and extend its functionality to take the min of multiple numbers at once.

* add tests for util.SelectBool

* Add tests for self evition options.

* enable self-eviction integration tests.

* s/PingDisable/DisablePing.

* Documentation, nits and some naming.

* Prevent hooks to be registered after self eviction has started.

* Call all phases from SelfEvict,

Since some phases are somewhat complicated and logically separated I kept them in their own functions.

* comments

* use master for integration tests

* Make it easier to test all targets at once

* regenerate tchannel code with newer version of generator

* Address round of feedback

* Add stat timer for self-eviction

* regenerate mocks after clean setup

* Use identity instead of a name to prevent dual registery of self eviction hooks

* revisit eviction logic + locking

* s/was/is

* Make sure the numberOfPings logged equals the number of selected targets

* Add test to make sure hooks can't be registered after self eviction.

* use make test to test all possible tests

* Remove SelfEvictDisablePing option
* drop go 1.5 support on travis

* consolidate tests
Correct ineffassign warnings
This is the first part of identity carry over where we abstract the RBTree to not care about the datatypes stored as long as the key is sortable via a Compare function it will create a RBTree.

This will help in later stages where the `keytype` will be a struct with more data points instead of a string.
This PR is part 2 for identity carry over.

In this PR we introduce a stricter interface for what a `Membership` is in a `membership` package. The membership defines an 'observable membership' for the application. Only containing members that are an active part of the membership eg. No `faulty`, `leave` or `tombstone` members will be observable.

It introduces what a `Member` is via an interface and makes sure that the `swim.Member` implements it.

Lastly it adds an event that is triggered when changes happen to the membership. This event is different from the swim event that contains changes in that it contains the `Before` and `After` state of a `Member` that can be used by the application to respond to.
This PR is part 3 for identity carry over.

This PR hooks up the hashring to the newly introduced `membership` package. Instead of talking about servers as strings we respond to `memberhip.MemberChange` slices. This has the benefit that we have access to more fields exposed on a member than just its address.
This PR is part 4 of identity carry over.

This PR actually adds the meat of the story with actual identity carry over. It extends the replica point with more information that will later be used by a new checksumming mechanism and a mechanism that will be backwards compatible with the current checksumming mechanism but added identity support.

Identities are stored in ringpop labels, this mechanism allows for reliable synchronization within the cluster. It uses a key in the private namespace of labels `__identity`. This prevent applications from altering it outside of the supported channels.

If the identity key is missing it will fall back to the address of the Member. This allows for backwards compatibility with other versions and an easy upgrade path when identity is not set on a member.
This PR is part 5 for identity carry over.

In this PR a new mechanism for calculating ring checksums is added. It aims to be forward compatible by naming checksums after the algorithm used so that new algorithms can be added and old algorithms can be removed when appropriate.

At the same time the old algorithm will start its EOL and all references to that are renamed to indicate legacy. The old algorithm does not capture all aspects of the hashring and will not warn about programmer error in the hashring.

The newly added `replica` checksummer will walk the ring from the beginning to the end and capture all significant datapoints of a `replicapoint` in its checksum that should prevent two rings that are out of sync to provide the same checksum.
…tuctor (#194)

Instead of specifying the identity after bootstrap, rename the existing `Identity` and `IdentityResolverFunc` options to `Address` and `AddressResolverFunc` and add an `Identity` option to specify the identity.

Note: this introduces a backwards incompatible change. `CHANGES.md` contains a `go fmt` command to resolve any issues.
Together with supporting identities we can fix a longstanding bugs where replica-points can collide when there are multiple instances running on the same machine.
Compare address and index on hash collision
@mennopruijssers
Copy link
Contributor Author

mennopruijssers commented Dec 21, 2016

direct link to the changelog changes: 14e9e24

Copy link
Contributor

@dansimau dansimau left a comment

Choose a reason for hiding this comment

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

fine

Copy link
Contributor

@thanodnl thanodnl left a comment

Choose a reason for hiding this comment

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

Looking good, but as discussed I think we should come up with a logical order for the bullet points in the changes that is most natural to a user. eg, fixes first so they know what the impact is to their service to prioritize upgrading. Features as the new things one can do and end in the optimizations that make our life easier.

v0.8.0
------

* Feature: Self-eviction [#177](https://github.com/uber/ringpop-go/pull/177)
Copy link
Contributor

Choose a reason for hiding this comment

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

lets order this list as:

  • Fix
  • Fearute
  • Travis

As a natural order of importance.

### Release notes

#### Identity Carry Over
Identity carry over provides a way to manually configure the identity of a member on a hashring.
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: s/on a hashring/on the hashring/


#### Self Eviction
By calling `ringpop.SelfEvict` on shutdown, a member will declare itself as `faulty` and gossips this to the other members.
This removes the time window where it was marked as `suspect`; in this way removing the time where other members
Copy link
Contributor

Choose a reason for hiding this comment

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

s/it was marked/it would be marked/

Menno Pruijssers and others added 6 commits December 22, 2016 10:03
Due to self-eviction, this happens in the normal code path
* Add tests to verify if forwarding headers are leaked.

* only set the forwarding header when forwarding over the wire

* update generated code of examples to reflect changes in thrift-gen file.

* test isRemote on Router.

* change the name of the forwarded header and send the keys used in forwarding instead of a static true value

* Address first round of feedback.

* Changed name of cached value

* Add example (which doubles as a test) for self request

* use a list as the return value for GetAll to enforce consistent ordering so the output can be easily glob verified

* use non-naked returns because big function

* Rename perserving to preserving.

* add explanation how the keys are chosen

* add test for multiple keys that is forwarded for

* Rename HasForwardedHeader to relfect its implementation of deleting it.

* fix typo
@mennopruijssers mennopruijssers merged commit 33075b6 into master Dec 23, 2016
@mennopruijssers mennopruijssers deleted the release-v0.8.0 branch January 3, 2017 13:57
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.

None yet

4 participants