Commit graph

429 commits

Author SHA1 Message Date
Patrik Nordwall
2bc8460777
review patience config (#30709)
* take it from testkit settings instead of hard coded
* dilate it
* it's still somewhat confusing since we have both
  classic and typed testkits and they dilate the default
  timeout differently, but don't want to change too much
2021-10-01 16:48:16 +02:00
Arnout Engelen
8086c70437
Build akka-cluster-sharding with scala3 (#30712)
* Build akka-cluster-sharding with scala3

Umbrella issue https://github.com/akka/akka/issues/30243
Not running tests yet due to https://github.com/akka/akka/issues/30711

* scalafmt

* Remove leftover val
2021-09-25 12:42:15 +02:00
Johan Andrén
f05e53d1a8
Add log capturing to get details about SupervisionSpec failing #30633 (#30705) 2021-09-22 10:07:51 +02:00
Renato Cavalcanti
42c232951c
extractShardId should include StartEntity (#30632) 2021-09-06 14:52:32 +02:00
Renato Cavalcanti
01de066bfc
avoid race condition by wait for lease lost message first (#30640) 2021-09-06 14:21:00 +02:00
Andrea Peruffo
d75ad252b8
Run multi-node tests on fresh GKE clusters (#30570)
* Port multi-node-test from Jenkins
* link to issues for gh-excluded tests
* use kubectl in multi-jvm plugin
2021-08-27 17:40:51 +02:00
Patrik Nordwall
0305a5f05a
Exclude exiting members in Read/Write MajorityPlus, #30327 (#30328)
* this saves at least 2 seconds where the coordinator is not able to respond
  when the oldest node is shutdown
* also reduce default write-majority-plus for sharding, introduced in #28856
2021-08-18 15:34:30 +02:00
Arnout Engelen
51924f5026
Quieter logging for ShardCoordinator initialization (#30488)
* Log the first retry on 'info', then 'warning', and finally 'error'
2021-08-18 10:05:24 +02:00
Arnout Engelen
071a074ccb
Fix StartEntitySpec instability
The old logic allowed a race condition where the 'StartEntity' from the
test arrived at the ShardRegion before the termination of the actor did,
causing it to ignore the `StartEntity`.
2021-08-13 15:31:58 +00:00
Ignasi Marimon-Clos
3a76aa1ad2 Migrate PRValidation to GHActions
* Set sbtopts inline
* Ignore flaky, obsolete test
* Adds concurrency limit (run only latest commit
* Don't run scala3 workflows until ready to merge
* split publishLocal from pr validation
2021-08-11 11:26:04 +02:00
Arnout Engelen
ac70b1db38
sharding: actively signal 'region stopped' to the coordinator (#30402) 2021-07-20 12:01:53 +02:00
Johan Andrén
9d4e838efa
fix: Defer coordinator stop until region graceful stop has completed … (#30338)
* fix: Defer coordinator stop until region graceful stop has completed #28917

* Added multi jvm test

* Formatting

* Also send GracefulShutdown to region if it hasn't started gracefully shutting down yet
2021-07-19 12:34:28 +02:00
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