Commit graph

1968 commits

Author SHA1 Message Date
Ignasi Marimon-Clos
9f6fc2d6da Configure exit code and Coordinated Shutdown per-reason overrides (#25186)
* Enable exit code configurability

* Rollback first approach. Implement override

* Support overriding exit-jvm and terminate-actor-sys

* Simplifies code handling overrides
2018-06-06 08:45:55 +01:00
Doug Roper
b6d6d543a8 Optimize ByteString.grouped(size) (#25153)
* Add ByteString.grouped() benchmark & tests.

* Implement ByteString.grouped().

* PR comments.
2018-05-30 23:31:35 +09:00
Doug Roper
034f6c5c96 Remove unnecesary drop() from ByteString1.writeToBuffer(ByteBuffer) (#25151)
I found a strange call to `drop()` in `ByteString1.writeToBuffer(ByteBuffer)`. `drop()` instantiates a new `ByteString1` which is immediately discarded to GC. Appears unnecessary.

Removing it makes the `ByteString1` implementation match the one `ByteString1C`.
2018-05-29 20:13:07 +09:00
Doug Roper
8286ecffc5 Fix MultiByteArrayIterator.copyToArray silently drops bytes. #16303 (#25141)
I just got burned by #16303.

Answering https://github.com/akka/akka/issues/16303#issuecomment-62957914, it looks like `copyToArray[B >: Byte](Array[B])` can't call `getBytes(Array[Byte], Int, Int)` due to the type constraint (defined by `GenTraversableOnce`).

Instead, I'm going with the simple `isEmpty` solution proposed in the description of #16303 by @kpatrick-kixeye.
2018-05-24 16:11:50 +09:00
Olivier ROLAND
00f07c2429 Fix ReceiveTimeout issue with NotInfluenceReceiveTimeout #24770 2018-05-22 11:42:35 +03:00
Patrik Nordwall
e6633f17fa
Make sure Serialization.currentTransportInformation is always set, #25067
* The ThreadLocal Serialization.currentTransportInformation is used for serializing local
  actor refs, but it's also useful when a serializer library e.g. custom serializer/deserializer
  in Jackson need access to the current ActorSystem.
* We set this in a rather ad-hoc way from remoting and in some persistence plugins, but it's only
  set for serialization and not deserialization, and it's easy for Persistence plugins or other
  libraries to forget this when using Akka serialization directly.
* This change is automatically setting the info when using the ordinary serialize and deserialize
  methods.
* It's also set when LocalActorRefProvider, which wasn't always the case previously.
* Keep a cached instance of Serialization.Information in the provider to avoid
  creating new instances all the time.
* Added optional Persistence TCK tests to verify that the plugin is setting this
  if it's using some custom calls to the serializer.
2018-05-21 16:59:04 +02:00
Thomas Smith
3401a1bd21 Fix BoundedBlockingQueueSpec against spurious wakeups (#25025) 2018-05-21 17:09:25 +03:00
Patrik Nordwall
da5cc33b92 Java API for AsyncSerializer, #25078 2018-05-14 18:20:59 +02:00
Song Kun
f976f8d793 Add unit tests and polish Javadocs with lambdas for PatternsCS. #24881 (#24998)
* Add unit tests and polish Javadocs with lambdas for PatternsCS. #24881

* remove blocking from StopActor
2018-05-10 14:32:28 +02:00
Christopher Batey
90c2ce9f13
Async serializer marker trait (#24981)
This adds the possibility for akka persistence plugins to check
whether a serializer is asynchronous.

Not used for remoting.
2018-04-25 13:43:54 +01:00
Thomas Smith
80eff85527 Add tests for BoundedBlockingQueue (#24850) 2018-04-24 14:30:34 +02:00
Christopher Batey
4d20b2a660 Reduce size of jenkins logs
Each build is now over 40mb logs.

A lot of DEBUG logging was left on for test failures that have been
fixed. Added an issue # for ones that are still valid or if if it on
as the test verifies debug
2018-04-24 08:49:41 +01:00
Patrik Nordwall
1590cd40e1
Merge pull request #24882 from johanandren/wip-24609-continued-johanandren
#24609 continued johanandren
2018-04-12 21:41:33 +02:00
Johan Andrén
e1885093bf Cont. fix broken explicit ask pattern for Java, #24587
* Some cleanup and fixes
* All 6 overloads fixed and covered with tests
* rename in some Scaladoc samples
2018-04-12 20:05:42 +02:00
Kirill Yankov
3ebb9fa9c1 Fix serialization in TypedActor (#24851)
* fixed serialization in TypedActor
* generalized duplicates via Serialization.manifestFor
2018-04-12 18:58:13 +02:00
Heiko Seeberger
44862d13c1 Fix broken explicit ask pattern for Java (closes #24587)
Add mima filter

Cleanup mima filter
2018-04-12 18:49:31 +02:00
mucahitkantepe
e495dab941 AutoReceivedMessage with Timers bug fixed (#24080)
AutoReceivedMessage with FSM schedule bug fixed (#24080)

Tests added for both FSM and Timers trait for (#24080)

AutoReceivedMessage with PersistentFSM bug fixed and test added (#24080)
2018-04-12 22:21:12 +09:00
Patrik Nordwall
6a9fa1946d
Add java.time.Duration support in the JavaDSL in akka-actor module #24646 (#24883)
* Add java.time.Duration support in the JavaDSL in akka-actor module #24646
* add deprecation and change retry
2018-04-11 16:47:36 +02:00
Daniel Kalman
86e44167f3 Added retry pattern #22276 (#23997) 2018-03-26 13:56:20 +02:00
Jimin Hsieh
2c2b8ba001 Remove some of Unused import warning (#24650) 2018-03-16 12:08:29 +01:00
Konrad `ktoso` Malawski
563c7fbcf0 Issue 24594: Integration with sbt-headers and initial header population 2018-03-13 15:45:55 +01:00
kerr
33ca78052c = util add Throwables helper to help fatal checking of Throwable for Java,alias with Scala's Nonfatal pattern matching. (#24661) 2018-03-09 17:13:59 +09:00
kerr
97ca714d17 = all remove semicolons "bye-bye semicolon" (#24659) 2018-03-06 09:53:28 +09:00
Josep Prat
4661ee03cf Fixes broken test for Scala 2.12 #24617
Refs: #24617
Fixes tests for Scala 2.12.x
There are still some differences between 2.11 and 2.12
2018-03-01 17:25:09 +09:00
Johan Andrén
b7cc50cdd6
2.5.10 wire protocol regression (#24625) 2018-02-28 09:46:37 +01:00
Josep Prat
5040ce82f1 LineNumbers for Lambda's #24480 2018-02-22 11:29:08 +01:00
Johan Andrén
5fa700ef78 Make stashing timer messages work (#24565)
* Make stashing timer messages work #24557

* Formatting ... ... ...

* Avoid the extra allocation if possible
2018-02-20 10:26:24 +09:00
Johan Andrén
d3b625616a
Generate file to use instead of assuming class loader type #23902
Makes the test pass on JDK 9 where the class loader assumption is not correct anymore.
2018-02-14 10:29:53 +01:00
Johan Andrén
5e6662c97c
Make MetricsBasedResizerSpec a bit slower but less GC sensitive #24397 (#24449) 2018-02-12 13:26:14 +01:00
Arnout Engelen
7dfd05eaf3 Specific message for serialize-messages errors (#24414)
* Specific message for serialize-messages errors

Give users some pointers where to look when this happens.

* Add copyright header

* Introduce SerializationCheckFailedException

* Use try rather than Try
2018-02-02 23:45:10 +09:00
Johan Andrén
3b54f238ea
Ability to disable coordinated shutdown phases #24477 2018-02-01 17:32:10 +01:00
Patrik Nordwall
23fa8b0810 change spelling of behaviour to behavior, #24457 2018-02-01 15:10:46 +01:00
Johannes Rudolph
c6250eddb3
Merge pull request #24399 from jrudolph/jr/don-t-initialize-serialization-in-RemoteActorRef
=act don't initialize Serializer extension in `RemoteActorRefProvider`
2018-01-31 11:41:53 +01:00
pwliwanow
7ba40b238a Fix in BackoffSupervisor.calculateDelay #24419 2018-01-29 12:05:27 +01:00
Johannes Rudolph
176bec52ae
=act don't initialize Serializer extension in RemoteActorRefProvider
Instead, load it as a library-extension.
2018-01-25 11:21:07 +01:00
Evgeny Veretennikov
5c68f2f627 #24303 ActorSystem.getWhenTerminated which returns CompletionStage 2018-01-18 14:36:21 +01:00
Catalin Ursachi
0529f1814b Remove redundant Futures tests (#24095) (#24130)
* Remove redundant Futures tests (#24095)

* Cleaned up tests

* Removed FutureSpec.scala
2018-01-16 08:45:01 +01:00
Johan Andrén
fc2413f29b
Version checking utility #24030 2018-01-09 20:11:14 +01:00
Christopher Batey
009214ae07
Update copyright to 2018 (#24241) 2018-01-04 17:26:29 +00:00
Łukasz Drygała
0c0bf91661 rewrite FlatSpec tests using WordSpec #24186 2018-01-03 12:51:27 +01:00
kerr
7edf3bfecf + actor #15446 add external predicate to ReceiveBuilder (#24221) 2018-01-03 10:23:31 +01:00
lorenzhawkes
124e6030d2 Use System.getProperty for ttl values found using legacy sun properties #24188 2017-12-21 19:48:34 +01: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
Patrik Nordwall
80f1292ac1 make it possible to disable all jvm shutdown hooks, #24077 (#24093) 2017-12-05 11:48:30 +01:00
Patrik Nordwall
c3f39bfe66
Merge pull request #24086 from evis/simplify-future-creations
Use Future.successful/failed instead of Promise.s/f.future
2017-12-04 14:46:06 +01:00
Patrik Nordwall
e49acb7daa add Reason to CoordinatedShutdown, #24048 2017-12-04 14:16:06 +01:00
gosubpl
cbc1c9a4f0 =act fix null sender in FunctionRef DeathWatch notification (#24084) 2017-12-04 09:25:15 +01:00
Evgeny Veretennikov
5e5a5d2c21 Use Future.successful/failed instead of Promise.s/f.future 2017-12-03 16:45:38 +03:00
Patrik Nordwall
1eb8459ae7 JavaSerializer should not supersede other serializer, #17252 (#24002)
* The classical problem when case class is extending a marker interface that is
  configured to a specific serializer, java.io.Serializable and the marker
  interface have no order. Multiple serializers found and then it is picking
  the first one.
* This changes that behavior so that if multiple serializers are found it gives
  JavaSerializer low priority and chooses the other serializer.
* This might look like a scary change from a compatibility perspective, but
  it should be fine becuse it is not influencing deserialization. The previous
  choice for serialization was pretty random so this choice should not make
  it worse.
2017-11-21 07:34:13 +00:00
Konrad `ktoso` Malawski
bb9d3927c8
=act #23961 increase timeouts in fsm spec a bit, change from deprecated method (#23969) 2017-11-13 21:12:00 +09:00