Commit graph

163 commits

Author SHA1 Message Date
Patrik Nordwall
0eedd714e8 reply to known shard locations immediately when waitingForUpdate, #24064 2018-01-09 13:51:35 +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
Christopher Batey
bd2a3de88a
Typed async testkit (#24203)
* Typed async testkit
* Pull out useful parts from internal TypedSpec into a public TestKit
* Port internal tests to use the external testkit
2018-01-04 15:09:38 +00:00
Patrik Nordwall
d2fd897926 tmp fix failing CoordinatedShutdownShardingSpec, #24113 (#24163)
* The real issue that should be fixed is that there seems to be a race
  between the CS and the ClusterSingleton observing OldestChanged
  and terminating coordinator singleton before the graceful sharding stop is done
2017-12-15 10:43:26 +01:00
Johan Andrén
582f6a4836
Revert source incompatible sharding changes (#24126)
* Revert "fix entityPropsFactory id param, #21809"
This reverts commit cd7eae28f6.
* Revert "Merge pull request #24058 from talpr/talpr-24053-add-entity-id-to-sharding-props"
This reverts commit 8417e70460, reversing
changes made to 22e85f869d.
2017-12-07 17:49:29 +01:00
Patrik Nordwall
cd7eae28f6 fix entityPropsFactory id param, #21809 2017-12-07 13:17:04 +01:00
Patrik Nordwall
8417e70460
Merge pull request #24058 from talpr/talpr-24053-add-entity-id-to-sharding-props
Add entity id to sharding props (#24053)
2017-12-06 07:35:28 +01:00
Tal Pressman
a8e5f48f36 add entity id to sharding props (#24053) 2017-12-05 16:49:05 +02:00
Patrik Nordwall
774bfee074
Merge pull request #24049 from akka/wip-24048-coordinated-downing-patriknw
Run all CoordinatedShutdown phases also when downing, #24048
2017-12-05 13:01:43 +01:00
Christopher Batey
76b2cfa676 Add common multi jvm config to cluster tests (#23974) 2017-12-04 15:23:55 +01:00
Patrik Nordwall
fa3da328be Run all CoordinatedShutdown phases also when downing, #24048 2017-12-04 11:05:22 +01:00
Christopher Batey
99511a0027 Fix race in ClusterShardingFailureSpec
AFAICT there was nothing ensuring the order of messages when sent to the
shard and the region so first checkthat the passivation has happened
before sending another add in the test

Refs #24013
2017-11-20 16:35:47 +00:00
Christopher Batey
1eb3abb27e
Fix lookup of coordinator for sharding proxies (#23995) 2017-11-15 13:03:48 +00:00
Unknown
6587d9e522 Separate sharding regions and proxies, #23472 2017-11-14 11:42:13 +01:00
Daniel Schröter
f2e9b52699 Provide access to known shard types add test #23912 2017-11-11 00:53:54 +01:00
danischroeter
e7bbbdf8ed Provide access to known shard types #23912 (#23913)
* Provide access to known shard types #23912

* applied format
2017-11-11 08:25:33 +09: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
Sergiy Prydatchenko
f2ebe60b95 Fix excessive rebalance in LeastShardAllocationStrategy (#23830) (#23834)
* Having maxSimultaneousRebalance > rebalanceThreshold in LeastShardAllocationStrategy caused shards "flapping" (deallocation of excessive shards followed by their immediate allocation on the same node)
2017-10-31 19:28:36 +09:00
Christopher Batey
83a97256cc Turn on gossip logging for flaky test + improve test error msg (#23868) 2017-10-30 14:52:58 +01:00
Martynas Mickevičius
82ca8a2cc7 Port build to SBT 1.x (#23850)
* Port build to SBT 1.x

* Fix multinode tests, always enable genjavadoc bootstrap
2017-10-30 10:13:13 +09:00
Arnout Engelen
b1df13d4d4 Update scalariform (#23778) (#23783) 2017-10-06 10:30:28 +02:00
Patrik Nordwall
0ed5bc1835 add mima filters 2017-08-31 11:29:49 +02:00
Patrik Nordwall
6ed3295acd Merge branch 'master' into wip-multi-dc-merge-master-patriknw 2017-08-31 10:51:12 +02:00
Patrik Nordwall
6bfb7c9262 increase timeout in MultiDcSplitBrainSpec
* due to handshake timeout

reduce handshake timeout

fourth might generate UnreachableDataCenter in unsplit

MultiDcClusterSharding
2017-08-31 10:26:23 +02:00
Martynas Mickevičius
bc0f2ee26d Load MiMa filters from file (#23083) 2017-07-27 12:33:14 +02:00
Johan Andrén
9c7e8d027a Renamed/moved the self data center setting #23312 (#23344) 2017-07-12 11:47:32 +01:00
Patrik Nordwall
87d74f1510 Docs for multi-DC features 2017-07-07 16:55:22 +02:00
Arnout Engelen
dd71f5759f Add some more imports to cluster sharding doc examples (#23305) 2017-07-06 08:05:48 -07:00
Patrik Nordwall
a7ed5ce6b0 fix copy-pasta mistake in ShardRegion 2017-07-06 11:02:49 +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
9835c08779 harden ClusterShardingRememberEntitiesSpecNewExtractorSpec 2017-05-23 13:44:24 +02:00
Patrik Nordwall
bf6cd6d2c7 harden another case in ClusterShardingSpec, #23006
* due to the new StartEntity message the start is not
  as instant as it used to be and therefore the test must
  retry this check
2017-05-23 07:24:04 +02:00
Patrik Nordwall
edef9e34c7 serialize-creators=off in tests, #23003 2017-05-22 20:11:03 +02:00
Patrik Nordwall
99a044b472 fix remember entities tests, #22994 2017-05-22 14:58:41 +02:00
Johan Andrén
86aa42cf6c remember entities and changing shardIdExtractor (#22894)
* Test case covering changing shard id extractor with remember-entities

* This should do the trick

* Feedback addressed

* Docs and migration guide mention

* Correct logic to persist that entity has moved off off shard
2017-05-22 10:08:18 +02:00
Patrik Nordwall
8f2de2a0ac Merge pull request #22951 from akka/wip-22893-idByRef-leak-patriknw
cleanup the Shard idByRefs map when entity terminated, #22893
2017-05-19 14:49:39 +02:00
Patrik Nordwall
32e6a59363 Start shards after full cluster restart, #22868
* when using remember entities with ddata mode the set of
  shards were not saved in durable storage and therefore the
  remembered entities were not loaded until the first message
  was sent to the shard
* the coordinator stores the set of shards in a durable GSet
* loaded when the coordinator is started and added to the State,
  rest is already taken care of via the unallocatedShards Set in
  the State
* when new shards are allocated the durable GSet is updated if it
  doesn't already contain the shard identifier
2017-05-19 14:47:35 +02:00
Lukas Phaf
18b791a714 Correct error in sharding snapshot deletion code #22916 2017-05-19 13:33:01 +02:00
Patrik Nordwall
6246528e86 cleanup the Shard idByRefs map when entity terminated, #22893 2017-05-15 15:27:58 +02:00
Patrik Nordwall
72981a3be8 fix compilation error, duplicate wildcard imports 2017-04-28 18:12:30 +02:00
Patrik Nordwall
3ab101039f Lazy init of LmdbDurableStore, #22759 (#22779)
* Lazy init of LmdbDurableStore, #22759

* to avoid creating files (and initializing db) when not needed,
  e.g. cluster sharding that is not using remember entities
* enable MiMa against 2.5.0

* use OptionVal instead
2017-04-28 15:12:14 +02:00
James Roper
ed2935b7c1 Fix doubly namespaced setting
Changed `akka.cluster.sharding.distributed-data.akka.cluster.sharding.distributed-data.max-data-elements` to `akka.cluster.sharding.distributed-data.max-delta-elements`.
2017-04-21 14:40:08 +10:00
Björn Antonsson
2573a02f10 Consolidate various message buffer implementations 2017-03-16 10:00:29 +01:00
Johan Andrén
2eb226ed32 ActorContext.getParent for Java API #22413 2017-03-16 09:30:00 +01:00
Konrad `ktoso` Malawski
f7b7c3642d =pro silence MiMa warning in testkit 2017-03-10 14:21:37 +01:00
haggy
b2721b9dc3 Log a warning if an entity ID extractor is not defined for a message #22395 2017-02-28 16:01:03 +01:00
Patrik Nordwall
17794a92a5 Merge pull request #22348 from akka/wip-22327-many-remember-entities-patriknw
document remember entities limitation, #22327
2017-02-24 10:31:58 +01:00