Commit graph

122 commits

Author SHA1 Message Date
Patrik Nordwall
23fa8b0810 change spelling of behaviour to behavior, #24457 2018-02-01 15:10:46 +01:00
Konrad `ktoso` Malawski
c7f842942d
=clut #24311 timer event may arrive after we already identified successfuly (#24442)
* =clut #24311 timer event may arrive after we already identified successfuly

* mark as NoSerializationVerificationNeeded
2018-01-30 18:17:01 +09:00
Patrik Nordwall
da565edbc6 harden DistributedPubSubRestart, #24100 2018-01-26 07:13:34 +01:00
Patrik Nordwall
115f9b2a33 harden ClusterClientSpec, #24277 2018-01-10 10:48:55 +01:00
fredfp
0bd408977b cluster client handover when receptionist's node leaves the cluster (#24167)
* Always add sender of GetContacts to client interactions

* Handover clients when receptionist leaves the cluster

* Revision based on code review

* Cluster receptionist only tracks connected clients
2018-01-09 10:41:33 +01:00
Christopher Batey
0380cc517a Cluster singleton manager: don't send member events to FSM during shutdown (#24236)
There exists a race where a cluter node that is being downed seens its
self as the oldest node (as it has had the other nodes removed) and it
takes over the singleton manager sending the real oldest node to go into
the End state meaning that cluster singletons never work again.

This fix simply prevents Member events being given to the Cluster
Manager FSM during a shut down, instread relying on SelfExiting.

This also hardens the test by not downing the node that the current
sharding coordinator is running on as well as fixing a bug in the
probes.
2018-01-05 09:47:43 +01:00
Christopher Batey
009214ae07
Update copyright to 2018 (#24241) 2018-01-04 17:26:29 +00:00
Patrik Nordwall
fa3da328be Run all CoordinatedShutdown phases also when downing, #24048 2017-12-04 11:05:22 +01:00
Patrik Nordwall
436668687a Move coordinated-shutdown config from test/resources, #23879
* looks like the ActorSystem is shutdown when leaving
* Included in MultiNodeSpec, i.e. all multi-node tests:
  akka.coordinated-shutdown.terminate-actor-system = off
  akka.oordinated-shutdown.run-by-jvm-shutdown-hook = off
2017-11-07 15:38:35 +01:00
Patrik Nordwall
bef1ea0db4 shm leak in ClusterSingletonProxySpec, #23844 2017-10-30 14:53:41 +01:00
Arnout Engelen
b1df13d4d4 Update scalariform (#23778) (#23783) 2017-10-06 10:30:28 +02:00
Patrik Nordwall
5fc6d5a04a Verify removal and add of new node incarnation in multi-dc, #23585
* MemberRemoved must be published before MemberUp, e.g. when restarted
  in other DC
* remove from failureDetector when receiving gossip with new member,
  not only new joining member

* increase timeout in MultiDcSingletonManagerSpec
2017-09-25 16:47:06 +02:00
Rafał Sumisławski
d4c929d771 Make sending messages to dead letters by DistributedPubSubMediator configurable. #23462 (#23615) 2017-09-25 11:15:06 +02:00
Arnout Engelen
e13e26aaab Disable min-nr-of-members for ClusterSingletonProxySpec #23619, #23627 2017-09-19 09:20:52 +02:00
Patrik Nordwall
cb08535e7d use right youngest when moving to Up, #23582
* also confirm TakeOverFromMe when singleton already in oldest state
2017-09-04 16:02:23 +02:00
Patrik Nordwall
6ed3295acd Merge branch 'master' into wip-multi-dc-merge-master-patriknw 2017-08-31 10:51:12 +02:00
Konrad `ktoso` Malawski
d07df2b917 =clt #23215 fail with nicer message if PubSubMediator gets null message (#23216)
* =clt #23215 fail with nicer message if PubSubMediator gets null message

* Update DistributedPubSubMediator.scala
2017-08-20 19:02:15 +02:00
Martynas Mickevičius
bc0f2ee26d Load MiMa filters from file (#23083) 2017-07-27 12:33:14 +02:00
Johan Andrén
6cd3b17854 Annotated extendable cluster tool actors with DoNotInherit (#23335) 2017-07-26 10:42:13 +02:00
Johan Andrén
9c7e8d027a Renamed/moved the self data center setting #23312 (#23344) 2017-07-12 11:47:32 +01:00
Arnout Engelen
14ef960f5e Improve Java pubsub example
`Put` does not result in a `SubscribeAck`
2017-07-10 10:26:01 +02:00
Patrik Nordwall
87d74f1510 Docs for multi-DC features 2017-07-07 16:55:22 +02:00
Patrik Nordwall
0b1ce7223d fix usage of the the leader sorted set in Replicator
* since the ordering can change based on the member's status
  it's not possible to use ordinary - for removal
* similar issue at a few places where ageOrdering was used
2017-07-05 14:56:12 +02:00
Patrik Nordwall
bb9549263e Rename team to data center, #23275 2017-07-04 17:11:21 +02:00
Patrik Nordwall
e0fe0bc49e Make cluster sharding DC aware, #23231
* Sharding only within own team (coordinator is singleton)
* the ddata Replicator used by Sharding must also be only within own team
* added support for Set of roles in ddata Replicator so that can be used
  by sharding to specify role + team
* Sharding proxy can route to sharding in another team
2017-07-04 15:04:43 +02:00
Patrik Nordwall
2044c1712b Support cross team in ClusterSingletonProxy, #23230 2017-07-04 10:47:45 +02:00
Arnout Engelen
ccea5a0eac Make cluster singleton DC aware, #23230 2017-07-04 10:21:27 +02:00
Richard Imaoka
ce96053dcd Merge paradox/scala/cluster-singleton.md and java/cluster-singleton.md (#23184) 2017-06-20 00:27:08 -07:00
Johan Andrén
168b40e40c Two unrenamed variable references fixed (#23120) 2017-06-07 18:00:02 +02:00
Arnout Engelen
41098a427f Some cleanups in ClusterClientSpec (#23095)
Mainly replacing within+awaitAssert with awaitAssert with a timeout - seems
cleaner.
2017-06-07 05:54:47 -07:00
Christopher Hunt
f4bf497536 Corrected the setup of contact paths for subscribers #22991
The initial contact paths should be assumed as published as that's what client subscribers will receive upon subscription. Any changes to contact points are a delta to that.
2017-06-04 11:40:17 +02:00
Patrik Nordwall
edef9e34c7 serialize-creators=off in tests, #23003 2017-05-22 20:11:03 +02:00
everetennikov
b072b741c6 Proper Logging.simpleName() invocation with Class[_] arg instead of Class[_].getName #22533 2017-04-17 20:44:29 +03:00
Björn Antonsson
2573a02f10 Consolidate various message buffer implementations 2017-03-16 10:00:29 +01:00
Nicolas Rémond
6cb5cbfae7 semicolon aren't such a thing in Scala 2017-02-22 12:58:13 +01:00
Johan Andrén
8f9b4f203a Pass the deserialized message on when serialize-messages on #13751 2017-02-17 16:41:25 +01:00
Patrik Nordwall
b6f4bddea3 Merge pull request #22118 from akka/wip-22117-proxy-remove-patriknw
stop ClusterSingletonProxy when self member removed, #22117
2017-01-24 11:49:51 +01:00
Patrik Nordwall
4bd6b7aab1 improve AbstractActor, #21717
* Receive class that wraps PartialFunction, to avoid
  scary scala types
* move AbstractActorContext to AbstractActor.ActorContext
* converting docs, many, many UntypedActor
* removing UntypedActor docs
* add unit test for ReceiveBuilder
* MiMa filters
* consistent use of getContext(), self(), sender()
* rename cross references
* migration guide
* skip samples for now
* improve match type safetyi, add matchUnchecked
  * the `? extends P` caused code like this to compile:
    `match(String.class, (Integer i) -> {})`
  * added matchUnchecked, since it can still be useful (um, convenient)
    to be able to do:
    `matchUnchecked(List.class, (List<String> list) -> {})`
* eleminate some scala.Option
  * preRestart
  * findChild
  * ActorIdentity.getActorRef
2017-01-23 18:30:52 +01:00
Patrik Nordwall
eb8ebd09bd stop ClusterSingletonProxy when self member removed, #22117 2017-01-23 11:59:12 +01:00
Patrik Nordwall
84ade6fdc3 add CoordinatedShutdown, #21537
* CoordinatedShutdown that can run tasks for configured phases in order (DAG)
* coordinate handover/shutdown of singleton with cluster exiting/shutdown
* phase config obj with depends-on list
* integrate graceful leaving of sharding in coordinated shutdown
* add timeout and recover
* add some missing artery ports to tests
* leave via CoordinatedShutdown.run
* optionally exit-jvm in last phase
* run via jvm shutdown hook
* send ExitingConfirmed to leader before shutdown of Exiting
  to not have to wait for failure detector to mark it as
  unreachable before removing
* the unreachable signal is still kept as a safe guard if
  message is lost or leader dies
* PhaseClusterExiting vs MemberExited in ClusterSingletonManager
* terminate ActorSystem when cluster shutdown (via Down)
* add more predefined and custom phases
* reference documentation
* migration guide
* problem when the leader order was sys2, sys1, sys3,
  then sys3 could not perform it's duties and move Leving sys1 to
  Exiting because it was observing sys1 as unreachable
* exclude Leaving with exitingConfirmed from convergence condidtion
2017-01-16 09:01:57 +01:00
Patrik Nordwall
1eba8656cd Merge pull request #22094 from akka/wip-22093-ClusterClient-ask-patriknw
stop ClusterClient ResponseTunnel after first reply when ask is used, #22093
2017-01-10 10:34:41 +01:00
Patrik Nordwall
b213a7af20 stop ClusterClient ResponseTunnel after first reply when ask is used, #22093 2017-01-05 17:13:24 +01:00
Philippus Baalman
6c7085252a extended copyright into 2017 2017-01-04 17:37:15 +01:00
Patrik Nordwall
e494ec2183 catch NotSerializableException from deserialization, #20641
* to be able to introduce new messages and still support rolling upgrades,
  i.e. a cluster of mixed versions
* note that it's only catching NotSerializableException, which we already
  use for unknown serializer ids and class manifests
* note that it is not catching for system messages, since that could result
  in infinite resending
2016-12-16 20:14:37 +01:00
Johan Andrén
2679be5ae4 Disable serialization warnings in akka test suites #21882 2016-11-23 12:02:36 +01:00
Patrik Nordwall
a7eed00948 Merge pull request #21813 from akka/wip-21518-patriknw
minor cleanup of cluster.subscribe usage
2016-11-16 21:33:02 +01:00
Patrik Nordwall
88a6bdb059 Cluster singleton testing (#21803)
* add another singleton restart test

* remove from singleton sorted set with unique address

* because the upNumber used by the Ordering can change
2016-11-11 15:10:30 -08:00
Patrik Nordwall
d9e873644e minor cleanup of cluster.subscribe usage 2016-11-08 15:14:52 +01:00
Patrik Nordwall
9be7df1527 send terminationMessage to singleton when leaving last, #21592 (#21654)
* send terminationMessage to singleton when leaving last, #21592

* When leaving last node, i.e. no newOldestOption, the manager was
  just stopped. The change is to send the terminationMessage also
  in this case and wait until the singleton actor is terminated
  before stopping the manager.
* Also changed so that the singleton is stopped immediately when
  cluster has been terminated when last node is leaving, i.e.
  no newOldestOption. Previously it retried until maxTakeOverRetries
  before stopping.
* More comprehensive test of this scenario in ClusterSingletonManagerLeaveSpec

* increase test timeout
2016-10-28 14:23:18 +02:00
Niko Will
5fe950e694 Adding protobuf serialization for SendToOneSubscriber (cluster pubsub) #21629 2016-10-08 16:09:29 -05:00