Commit graph

489 commits

Author SHA1 Message Date
RibleStrype
96639c537e
fix premature reset of the 'writeInProgress' flag in case of persistence failure #28629 2020-03-19 15:59:46 +01:00
Patrik Nordwall
5bde02380a Don't include event in PersistentRepr.toString
* Logging of toString of unknown classes should be avoided, since it could be huge
* Logging for EventSourcedBehaviorImpl includes the PersistentRepr,
  for example:

```
Received Journal response: WriteMessageSuccess(PersistentImpl(Confirmed(2,q1,1583924066958),6,pid-6),,false,null,831cd256-9bc5-40e3-b84c-4a2d34dde643,0),9)
```
2020-03-17 11:56:14 +01:00
Patrik Nordwall
98f8179376
Mark journalFor and OptionVal InternalStableApi (#28716)
* journalFor is used by akka-persistence-cassandra
2020-03-13 17:51:50 +01:00
Renato Cavalcanti
b02ac89caa
Merge pull request #28598 from akka/wip-PluginHolder-patriknw
Don't start journal when accessing event adapters, #28597
2020-03-02 22:48:19 +01:00
Renato Cavalcanti
86bfcd6e74
Fixed typo
Co-Authored-By: Arnout Engelen <arnout@bzzt.net>
2020-03-02 14:34:03 +01:00
Renato Cavalcanti
ec3d67df7e
Merge pull request #28542 from fredfp/issue-28541
Shield unsafe journal plugins from corner case, #28541
2020-02-13 13:46:21 +01:00
Patrik Nordwall
21bbae8c46 Fix LeveldbEndToEndEventAdapterSpec, it's not logging because journal not started 2020-02-12 16:50:18 +01:00
Renato Cavalcanti
77e1bfbc1b
Merge pull request #28594 from akka/wip-persistence-view-patriknw
remove obsolete PersistenceSettings.view
2020-02-12 15:43:50 +01:00
Patrik Nordwall
01b95c50ec Don't start journal when accessing event adapters, #28597 2020-02-11 19:36:14 +01:00
Patrik Nordwall
670a937d98 remove obsolete PersistenceSettings.view
* removing without deprecation because this can't be used anywhere
* persistence view has been removed years ago, and those config properties
  doesn't even exist in reference.conf so accessing this would throw exception
2020-02-11 14:51:57 +01:00
Arnaud Burlet
6c4aca1657
Add comment 2020-02-11 13:30:51 +01:00
Odd Möller
b0b05ecda8 Unwrap tagged events on addition (#28552) 2020-01-31 21:47:11 +01:00
Arnaud Burlet
6b23195385
Shield unsafe journal plugins from corner case, #28541 2020-01-30 09:14:02 +01:00
Yury Gribkov
004581a399 Rename RecoveryPermitter.pending for telemetry (#28503) 2020-01-21 09:15:30 +01:00
Johannes Rudolph
ec208cad08
Merge branch 'master' into scalatest310 2020-01-14 12:03:32 +01:00
Patrik Nordwall
856c4ff6f6
Rename Start message in HelloWorld (#28469)
* Rename more Start to SayHello

* fix copyright year in InmemJournalSpec
2020-01-13 14:48:31 +01:00
Mikhail Limansky
3f6a92aecf Merge remote-tracking branch 'akka/master' into scalatest310
# Conflicts:
#	akka-cluster-sharding-typed/src/test/java/jdocs/akka/cluster/sharding/typed/AccountExampleDocTest.java
2020-01-13 13:22:54 +03:00
Patrik Nordwall
cdc45c128d
Publish operations from InmemJournal (#28332)
* small feature that is useful for verifying that expected events were persisted
* doc example
* also enable serialization test config
2020-01-13 09:46:43 +01:00
Mike Limansky
d9ed927df0 Update to ScalaTest 3.1.0, fix #28289. 2020-01-11 15:15:10 +03:00
Patrik Nordwall
44cac83d0f
Use MessageBuffer in RecoveryPermitter, #28417 (#28418)
* Use MessageBuffer in RecoveryPermitter, #28417

* to propagate trace context

* feedback, while instead of zipWithIndex
2020-01-08 14:31:38 +01:00
Patrik Nordwall
efa856bc17 Timestamp in EventEnvelope, #28331 (#28383)
* added to EventEnvolope and therefore include case class stuff
  for binary compatibility
* also added in PersistentRepr, which for example is the serialized format in
  LeveldbJournal
2020-01-07 11:32:15 +01:00
Helena Edelson
6bf20f4117 Update all copyright headers to 2020 after new year's #27881 (#28434) 2020-01-02 13:24:59 +01:00
Brian Wignall
fd41299943 Fix typos, via a Levenshtein-style corrector 2019-12-19 01:57:55 -05:00
Johannes Rudolph
702b6a7f41 actor: allow seamless access to untyped extensions given typed ActorSystem (#28294)
* actor: allow seamless access to untyped extensions given typed ActorSystem

* add overrides with concrete type for Java API everywhere
2019-12-05 16:01:22 +01:00
Arnout Engelen
4b632c4537 Add convenience method to start timer without key (#27875)
* Add convenience method to start timer without key

It is probably common that there is no need to allow different timers
that send the same message, and this makes that more convenient to write.

Updated one method to gather feedback, if we like the change I can apply
it to the others as well.

* Add alternative to all typed timer API's

Update java/scaladoc, update tests

Not updated classic actors and FSM API's
2019-11-26 13:26:49 +00:00
Johan Andrén
a341343f2c latestPatchOf 2.5.26 (#28031)
* latestPatchOf 2.5.26

* Bincomp fixes
2019-10-18 16:30:55 +02:00
Patrik Nordwall
5de5dec6ee
Merge pull request #27988 from akka/wip-protobuf-3.10.0-patriknw
Update protobuf-java and protoc to 3.10.0
2019-10-15 11:09:30 +02:00
Patrik Nordwall
50a2355ec6 inmem journal must not reset highestSequenceNr after journal cleanup, #27994 (#27995)
* add tck test (failed for exactly this)
* keep track of highest
2019-10-15 10:37:48 +02:00
Patrik Nordwall
4e8a5d333b
More structured logger names, #27922 (#27934)
* some cluster logging improvements
* most logger names are actually good, when using ActorLogging since
  config can be setup on the package (prefix)
* override logSource when StageLogging is used
* replace system.log with more specific logger
2019-10-14 17:55:12 +02:00
Tanju Erinmez
9d21207f41 lastSequenceNr should reflect the snapshot sequence and not start with 0 when journal is empty (#27496)
* lastSequenceNr should reflect the snapshot sequence number and not start
at 0 when there was no journal to begin with.

* Use LevelDBJournal in Test Case

The test case now properly simulates a recovery from a snapshot without
a journal.

(cherry picked from commit df2a1d8a52e13aa09edd20bcf95ff617cd7acf9c)
2019-10-14 14:51:09 +02:00
Scala Steward
63df007685 protoc version 3.10.0 2019-10-14 11:11:21 +02:00
Johannes Rudolph
650068aa45
Convert 2.5.x MiMa excludes to subdirectory style
Using this script:

```sh

set -ex

FILE=$1
DIR=`dirname $FILE`
TMP_FILE=$DIR/_existing.excludes
FINAL_FILE=$DIR/2.5.x.backwards.excludes/_existing.excludes

mv $FILE $TMP_FILE
mkdir $DIR/2.5.x.backwards.excludes
(echo "# This file contains all excludes added before changing to the subdirectory style" && cat $TMP_FILE) > $FINAL_FILE
rm $TMP_FILE
git add $FINAL_FILE
```
2019-10-01 13:59:56 +02:00
Scala Steward
6b17a7a15f Update scalafmt-core to 2.1.0 (#27831)
* Update scalafmt-core to 2.1.0

* scalafmt
2019-10-01 12:24:51 +02:00
Patrik Nordwall
a7c43cf573
Config to exclude class prefix from serialize-messages, #24273 (#27517)
* Config to exclude class prefix from serialize-messages, #24273

* Adding no-serialization-verification-needed-class-prefix, with "akka." included
  by default
* This is important now when we disable Java serialization by default.
  There will be many complaints about Akka internal classes that are not marked with
  NoSerializationVerificationNeeded, and we can't really sprinkle that everywhere.
* Not removing NoSerializationVerificationNeeded usage in Akka classes because that
  may break bin compat, even though it's needed any more.

* fix DisabledJavaSerializerWarningSpec
2019-09-26 22:51:12 +02:00
Arnout Engelen
e6859253e5 Update to MiMa 0.6.0 (#27558) 2019-09-11 11:28:12 +02:00
Christopher Batey
6c13949aec Use protobuf3 for internal serialization (#27366)
* Only load akka protobuf serializer if protobuf on the classpath
2019-08-15 17:43:19 +02:00
Christopher Batey
e3164916ad Deprecate PersistentFSM
Refs #26490
2019-08-15 11:17:40 +02:00
Christopher Batey
a2ecd915cb
Remove extensions to protobuf config checker messages (#27400)
* Remove extensions to protobuf config checker messages

AFAICT these are never serialized/deserialized. Removing as they use a
deprecated feature of protobuf (required fields in extensions)
* Remove extensions from protobuf
2019-08-02 09:16:57 +01:00
Christopher Batey
89e269d5d8 Remove catchall silents from prod code (#27432)
* WIP

* Remove catch all silent annocations from prod code
2019-07-30 11:12:23 +02:00
Christopher Batey
e188b1f653 Migration guide for Persistent FSM to typed persistence (#27336) 2019-07-26 10:01:11 +02:00
Patrik Nordwall
3efc1c2877
Disable Java serialization by default, #22333 (#27285)
* akka.actor.allow-java-serialization = off
* Moved primitive (Long, Int, String, ByteString) serializers
  from akka-remote to akka-actor since they had no dependency
  and are useful also in local systems, e.g. persistence.
  * e.g. needed for persistence-tck
  * less allow-java-serialization=on in tests
* CborSerializable in Jackson/test module for ease of use
* JavaSerializable for Java serialization in tests, already in akka-testkit,
  but misconfigured
* Made tests pass
  * allow-java-serialization=on in akka-persistence
  * allow-java-serialization=on in classic remoting tests
  * JavaSerializable and CborSerializable in other remoting tests
* Added serialization for
  * Boolean
  * java.util.concurrent.TimeoutException, AskTimeoutException
* support for testing serialization with the inmem journal
* utility to verifySerialization, in SerializationTestKit
* remove AccountExampleWithCommandHandlersInState becuase not possible to serialize State when it's not static
  * Effect() is factory in EventSourcedBehavior  class
* test the account examples
* SharedLeveldbJournal.configToEnableJavaSerializationForTest
* support for exceptions from remote deployed child actors
  * fallback to akka.remote.serialization.ThrowableNotSerializableException
    if exception is not serializable when wrapped in system messages from
    remote deployed child actors and Status.Failure messages
  * it's implemented in `WrappedPayloadSupport.payloadBuilder`
* update reference documentation
* serialize-messages=off in most places, separate ticket for
  improving or removing that feature
* migration guide, including description of rolling update

* fix 2.13 compiler error

* minor review feedback
2019-07-11 14:04:24 +02:00
Christopher Batey
2db03309ce
Akka Persistence instrumentation improvements (#26946) (#27280) 2019-07-05 10:06:07 +01:00
Patrik Nordwall
72680e93bf EventSeq in Typed EventAdapter (#27130)
EventSeq in Typed EventAdapter, refs #26909
2019-07-05 09:46:10 +02:00
Patrik Nordwall
10d32fceb9 scheduleWithFixedDelay vs scheduleAtFixedRate, #26910
* previous `schedule` method is trying to maintain a fixed average frequency
  over time, but that can result in undesired bursts of scheduled tasks after a long
  GC or if the JVM process has been suspended, same with all other periodic
  scheduled message sending via various Timer APIs
* most of the time "fixed delay" is more desirable
* we can't just change because it's too big behavioral change and some might
  depend on previous behavior
* deprecate the old `schedule` and introduce new `scheduleWithFixedDelay`
  and `scheduleAtFixedRate`, when fixing the deprecation warning users should
  make a concious decision of which behavior to use (scheduleWithFixedDelay in
  most cases)

* Streams
* SchedulerSpec
  * test both fixed delay and fixed rate
* TimerSpec
* FSM and PersistentFSM
* mima
* runnable as second parameter list, also in typed.Scheduler
* IllegalStateException vs SchedulerException
* deprecated annotations
* api and reference docs, all places
* migration guide
2019-06-05 11:38:04 +02:00
Christopher Batey
c46a75247a Upgrade scalafmt 2019-05-29 10:20:45 +01:00
Christopher Batey
e7672a9802
Remove various features deprecated since 2.5.0 (#27023)
* Remove various features deprecated since 2.5.0
2019-05-29 07:10:40 +01:00
Christopher Batey
28fbd28e7a
Various internal stable markers (#27004) 2019-05-29 07:09:12 +01:00
Arnout Engelen
814cfa286c Scala 2.13.0 rc2 (#26967) 2019-05-24 08:11:50 +02:00
Christopher Batey
138ffe25d7
Hooks for Akka Persistence Typed lifecycle (#26999) 2019-05-23 15:10:32 +01:00
Dale Wijnand
03c4efdc1d Rewrite some code for Scala 2.13 (#26944)
* Rewrite some code for Scala 2.13

Rewrote some code to avoid some deprecations coming in 2.13.

* Drop usage of scala.Symbol in the tests
2019-05-20 08:59:49 +02:00