Commit graph

417 commits

Author SHA1 Message Date
Jens Neumaier
7d1b412b22
Resolve snapshot check skipped for some events (#30225) (#30226) 2021-06-03 17:04:57 +02:00
Johan Andrén
d4fdf5639e
Deprecate LevelDB (#30213)
* Deprecate LevelDB

In preparation of moving into the testing infra (or deleting it completely) at some distant future point in time

* Remove leveldb tests where there also is an inmem one

* More details in deprecation text, recommend inmem + journal proxy for testing etc.
2021-06-02 13:37:52 +02:00
Johan Andrén
fe1459fcbc
Small clarification of recovery strategy in config (#30167) 2021-06-02 11:57:51 +02:00
Jens Neumaier
73d74dfc69
Resolve missing internal state update in EventSourcedRememberEntities… (#30217) 2021-05-04 14:59:24 +02:00
Johan Andrén
c5655a9ce6
Upgrade to Scala 2.13.5 (#30072) 2021-03-30 20:57:23 +02:00
Patrik Nordwall
d19855542b
configuration for SBR lease release #30090 (#30092) 2021-03-11 13:29:20 +01:00
Christopher Batey
c5f16dcee1
Full cluster shutdown (#29838)
* member information for full cluster shutdown

* Cluster singleton: dont hand over when in ready for shutdown

* Noop everything in shard coordinator

* Set all members to preparing for shutdown

* Don't allow a node to join after prepare for shutdown

* Review feedbac: singleton listen to all member chagnes

* Java API

* More better

* Keep sharding working while ready for shutdown

* Mima

* Revert DEBUG logging

* gs

* Fix api doc link

* Missed review feedback

* Review feedback
2021-02-12 09:59:20 +00:00
Nicolas Vollmar
278a36d036
Adds explicit ! method (#30004)
Needed for Scala 3
2021-02-10 13:20:29 +01:00
Andrea Peruffo
da70e0ccd4
Scala 3 cross compatible akka-actor / akka-testkit / akka-actor-tests (#29956)
* Remove @switch when it doesn't take effect
* Use ActorRef.noSender
* Minor tweaks to SchedulerSpec
* Disambiguate TypedActor for Scala 3
* Bump ScalaTest to a version compatible with Scala 3
* Bump ScalaCheck
* Disambiguate Event in SupervisorHierarchySpec
* Scala 3 compatible EventBusSpec
* Prevent private unused variables to be erased by Scala 3
* Bump mockito
* Explicit actorRef2Scala import
* restore original .scalafix.conf
* Scala 3 compatible tailrec
* Reminder to re add switch annotation in case
* Move to nowarn instead of silencer
* Bump to Scala 2.12.13
* Cross compatible annotations
* fix docs generation
* adapt the build for Scala 3
* fix errors but bus
* remove more SerialVersion from trait
* scalacheck only from scalatest
* cross-compile akka-actor-tests
* restore cross-compilation
* early initializers workaround
* scalacheck switch
* cross compatible FSM.State class
* cross compatible LARS spec
* Change results to pass LineNumberSpec
* fix stackoverflow in AsyncDnsResolverIntegrationSpec
* FSM.State unapply
* fix Scala 2.13 mima
* SerialVersionRemover compiler plugin
* removed unused nowarns
2021-02-01 16:38:29 +01:00
Arnout Engelen
31f654768f
Update copyright to 2021 2021-01-08 17:55:38 +01:00
Johan Andrén
3693b21383 Race condition in DeprecatedSupervisionSpec fixed #29735 2020-12-21 13:12:54 +01:00
ohze.net
9416dedad7
Use scalafix to update scala 2.13.3, silencer 1.7.0 (#29367) 2020-12-09 09:20:13 +01:00
Josep Prat
12513ec7df
Normalize Event Sourcing wording #29577 (#29856) 2020-12-07 08:41:43 +01:00
Renato Cavalcanti
028ad29164
Fix cluster sharding with remember entities test (#29773)
* fix cluster sharding with remember entities test

* send BeginHandOff to all regions
2020-11-02 17:09:56 +01:00
Renato Cavalcanti
592b1d10ad
Isolate shard init logic to own method (#29759) 2020-10-27 17:23:36 +01:00
Patrik Nordwall
330893e2c1
Unstash GetShardHome requests one-by-one, #29742 (#29748)
* because it's likely that the first GetShardHome request will result in
  allocation update and then all are stashed again
* rename to unstashOneGetShardHomeRequest
2020-10-19 12:36:02 +02:00
Patrik Nordwall
41d0906fb3
improve logging of shard region shutdown timeout, #29711 (#29747) 2020-10-15 11:40:29 +02:00
Johan Andrén
3a03fd5f39
Fix for PersistentShardingMigrationSpec failing #29234 #29690
and same fix for RememberEntitiesShardIdExtractorChangeSpec
2020-10-12 12:41:21 +02:00
Renato Cavalcanti
2f2076a80d
ShardRegion ignores HostShard when shutting down (#29707) 2020-10-07 21:01:53 +02:00
Johan Andrén
d36fc8f549
Handle when there are no known regions yet #29709 2020-10-07 16:29:39 +02:00
Patrik Nordwall
309326fcfa
consistently prefix sharding log messages with typeName (#29682)
* we already had it in the ShardRegion
* it's possible to see it from the actor path but that might not be
  obvious and many forget to configure their logback to show the akkaSource
* fix test
2020-10-05 12:27:01 +02:00
Renato Cavalcanti
289f665445
Make a distinction between hand-offs for rebalance and region shutdown (#29579) 2020-09-29 12:54:54 +02:00
Christopher Batey
50924e56ac
Merge pull request #29502 from chbatey/reintroduce-flush-on-terminate
Reintroduce flush on terminate
2020-09-25 16:14:56 +01:00
Christopher Batey
de1966c8a9 Disable death watch flush for remoting and fix race in rebalance worker 2020-09-25 14:39:27 +01:00
Christopher Batey
91398cdcdd
Cluster sharding health check (#29638)
* and update akka-docs/src/main/paradox/typed/cluster-sharding.md
2020-09-25 12:55:29 +02:00
Renato Cavalcanti
90dac8dcbb
swap args when initializing *MajorityPlus classes (#29664) 2020-09-24 18:48:38 +02:00
Johan Andrén
cadab9388f
Cluster aware shard allocation and rolling updates (#29548)
Adds some level of cluster awareness to both the LeastShardAllocationStrategy implementations:

* #27368 prefer shard allocations on new nodes during rolling updates
* #27367 don't rebalance during rolling update
* #29554 don't rebalance when there are joining nodes
* #29553 don't allocate to leaving, downed, exiting and unreachable nodes
* When allocating when there are joining, unreachable, are leaving are de-prioritized to decrease the risk that a shard is allocated just to directly need to be re-allocated on a different node.
2020-09-21 14:13:32 +02:00
Patrik Nordwall
a61b4868e0
reduce too verbose logging sharding, #27276 (#29590)
Such as:
* the forward message log in the region
* logging of full state in the coordinator
2020-09-14 16:26:59 +02:00
Patrik Nordwall
f0b3c9089b
Holistic shard allocation strategy, #29543 (#29555)
* The rebalance in the LeastShardAllocationStrategy is only comparing the region
  with most shards with the one with least shards. Makes the rebalance rather
  slow. By default it's only rebalancing 1 shard at a time.
* This new strategy looks at all current allocations to find the optimal
  number of shards per region and tries to adjust towards that value.
  Picking from all regions with more shards than the optimal.
* Absolute and relative limit on how many shards that can be rebalanced
  in one round.
* It's also not starting a new rebalance round until the previous has
  completed.
* unit tests
* second phase for fine grained rebalance, due to rounding it will not be perfect in the first phase
* randomized unit test
* configuration settings
* docs
2020-09-11 08:49:45 +02:00
Patrik Nordwall
7e768fa732
Merge pull request #29551 from akka/wip-29543-alloc-after-rebalance-patriknw
Allocate rebalanced shards immediately, #29543
2020-09-09 18:45:46 +02:00
Christopher Batey
6c631a65fe
Reduce sharding warnings when there are no buffered messages (#29525)
* Reduce sharding warnings when there are no buffered messages

If shard regions are started before the cluster is formed warnings are
logged. The user can wait until SelfUp but for the cases they don't make
logging debug until the user has buffered messages.

* Review feedback

* Review feedback
2020-09-08 09:17:34 +01:00
Patrik Nordwall
b09653c977 Allocate rebalanced shards immediately, #29543
* Otherwise it will continue to deallocate when there is no traffic
  that triggers allocations
2020-09-04 10:27:29 +02:00
Patrik Nordwall
bb985b82c6 fix compilation errors 2020-09-03 13:42:42 +02:00
Patrik Nordwall
4629cd44e4 Merge branch 'master' into feature-active-active-event-sourcing 2020-09-03 11:52:41 +02:00
mgutmanis
33fda3ae6f
Improve Shard#entityCreated API performance #29520
Expose size of reachable actor count
2020-09-02 16:49:36 +02:00
Patrik Nordwall
7bf12721c1 Merge branch 'master' into feature-active-active-event-sourcing 2020-09-02 15:46:06 +02:00
Johan Andrén
192be028a0
Sharding request-to-start but already started logging (#29545) 2020-09-02 14:18:44 +02:00
Christopher Batey
2d9660f847 Final review feedback 2020-08-25 10:02:27 +01:00
Patrik Nordwall
0601b7e83c
Merge pull request #29471 from akka/wip-29344-write-timeout-patriknw
fix write consistency timeout in Sharding, #29344
2020-08-18 12:23:49 +02:00
Patrik Nordwall
ae83968286
Merge pull request #29474 from akka/wip-29423-ClusterSingletonManagerLeaseSpec-patriknw
harden ClusterSingletonManagerLeaseSpec, #29423
2020-08-18 12:23:07 +02:00
Patrik Nordwall
34dfca53c8
Merge pull request #29496 from akka/wip-29185-RandomizedSplitBrainResolverIntegrationSpec-patriknw
reduce combinations in RandomizedBrainResolverIntegrationSpec, #29185
2020-08-18 12:20:01 +02:00
Christopher Batey
c934511c42
Forward terminated from ShardCoordinator to RebalanceWorker (#29463)
* Forward terminated from ShardCoordinator to RebalanceWorker

Avoiding the need for rebalance workers to watch shard regions which is
expensive as there is one rebalance worker per shard

* Review feedback
2020-08-18 11:25:01 +02:00
Patrik Nordwall
4be0b3c776 reduce combinations in RandomizedBrainResolverIntegrationSpec, #29185
* when the test generated scenarios that continued "instability" it
  could result in that node wasn't removed before new became active
2020-08-17 11:25:20 +02:00
Christopher Batey
849018b81e Replicated Sharding improvements (#29483)
* WIP

* Finishing touches to sharding updates

* Review feedback
2020-08-17 07:54:34 +01:00
Patrik Nordwall
fc44a02ae2 harden ClusterSingletonManagerLeaseSpec, #29423
* default test timeout too short for the join
2020-08-10 14:58:29 +02:00
Arnout Engelen
c41c0420ad
Update scala to 2.13.3 and silencer to 1.7.0 (#28991)
* Update scala to 2.13.3 and silencer to 1.7.0
* Also travis
* Fix various warnings
2020-08-10 12:54:38 +02:00
Patrik Nordwall
bb0a7c09dd fix write consistency timeout in Sharding, #29344 2020-08-10 10:36:05 +02:00
Johan Andrén
a061886af2
Avoid warning for NoState to RememberingStart when not remembering entities #29400 (#29404)
This is an unexpected transition but we did it as an implementation detail and
it should not cause a logged error.
2020-07-30 10:44:36 +02:00
Christopher Batey
212de410b0
Avoid stuck rebalances during coordinator leaving (#29385)
* Watch all regions as they may shutdown after rebalance starts

* Send graceful shutdown to selection if no coordinator found

* mima

* Add missing new line

* Make log markers consistent for rebalance worker
2020-07-17 12:44:12 +01:00
Johan Andrén
01edcab657
Allow entities to stop by terminating without remember entities (#29384)
* Allow entities to stop by terminating in sharding without remember entities #29383
  We missed an allowed transition from running/active to stopped/NoState in shard. 
  when the logic was rewritten.
* Add a toggle to opt-in crash shard on illegal state transitions
  Default is logging an error and not crashing shard and all other entities, our tests have the toggle enabled.
* A fix for passivation when not using remember entities fixing #29359 and possibly #27549
2020-07-15 08:38:23 +02:00