Commit graph

14063 commits

Author SHA1 Message Date
Konrad 'ktoso' Malawski
b1d1d87111 !per #15436 make persistenceId abstract in NEW classes
(cherry picked from commit de3249f7f4b859c3caa232e579d9a3bae7406803)

Conflicts:
	akka-samples/akka-sample-persistence-scala/src/main/scala/sample/persistence/PersistentActorExample.scala
2014-06-26 16:29:30 +02:00
Patrik Nordwall
43952af7ea Merge pull request #15450 from akka/wip-15424-master-patriknw
+per #15424 Added PersistentView, deprecated View (for validation)
2014-06-26 11:37:07 +02:00
Konrad 'ktoso' Malawski
3fd240384c +per #15424 Added PersistentView, deprecated View
A PersistentView works the same way as View did previously, except:

* it requires an `peristenceId` (no default is provided)
* messages given to `receive` are NOT wrapped in Persistent()

akka-streams not touched, will update them afterwards on different branch

Also solves #15436 by making persistentId in PersistentView abstract.

(cherry picked from commit dcafaf788236fe6d018388dd55d5bf9650ded696)

Conflicts:
	akka-docs/rst/java/lambda-persistence.rst
	akka-docs/rst/java/persistence.rst
	akka-docs/rst/scala/persistence.rst
	akka-persistence/src/main/scala/akka/persistence/Persistent.scala
	akka-persistence/src/main/scala/akka/persistence/View.scala
2014-06-26 10:10:09 +02:00
Patrik Nordwall
2203968adb Merge pull request #15444 from akka/wip-15429-persistence-docs-master-patriknw
=per #15429 Rewrite persistence documentation and samples (for validation)
2014-06-25 16:53:17 +02:00
Patrik Nordwall
d6ffdf521c =per #15429 Rewrite persistence documentation and samples for 2.3.4 changes
(cherry picked from commit 02351e32f110a8c4a249f0f3f84bae5898d1a836)

Conflicts:
	akka-samples/akka-sample-persistence-java-lambda/tutorial/index.html
	akka-samples/akka-sample-persistence-java/tutorial/index.html
	akka-samples/akka-sample-persistence-scala/build.sbt
	akka-samples/akka-sample-persistence-scala/src/main/scala/sample/persistence/ConversationRecoveryExample.scala
	akka-samples/akka-sample-persistence-scala/src/main/scala/sample/persistence/PersistentActorExample.scala
	akka-samples/akka-sample-persistence-scala/src/main/scala/sample/persistence/ProcessorChannelExample.scala
	akka-samples/akka-sample-persistence-scala/src/main/scala/sample/persistence/ProcessorChannelRemoteExample.scala
	akka-samples/akka-sample-persistence-scala/src/main/scala/sample/persistence/SnapshotExample.scala
	akka-samples/akka-sample-persistence-scala/src/main/scala/sample/persistence/StreamExample.scala
	akka-samples/akka-sample-persistence-scala/tutorial/index.html
2014-06-25 15:37:35 +02:00
Martin Krasser
062d304b73 +per,+str #15035 Reactive-stream producers for persistent messages written by akka-persistence processors
(cherry picked from commit 5dc62400e4f2f9d7afe5efe93fc8bef5b9d226c0)

Conflicts:
	akka-docs/rst/scala/code/docs/persistence/PersistenceDocSpec.scala
	project/AkkaBuild.scala
2014-06-25 15:07:50 +02:00
Patrik Nordwall
e22711107b Merge pull request #15430 from spray/w/add-japi-Option-getOrElse
+act #15383 add strict japi.Option.getOrElse to simplify working with options from Java
2014-06-25 14:00:02 +02:00
Konrad Malawski
887c30b916 Merge pull request #15435 from ktoso/port-deprecations-channel-ktoso
!per #15230 deprecate Channel and PersistentChannel (for Validation)
2014-06-24 20:37:24 +02:00
Konrad 'ktoso' Malawski
242473bae8 =per #15230 deprecate Channel and PersistentChannel
Conflicts:
	akka-persistence/src/main/scala/akka/persistence/Channel.scala
	akka-persistence/src/main/scala/akka/persistence/PersistentChannel.scala
	akka-persistence/src/test/scala/akka/persistence/serialization/SerializerSpec.scala
2014-06-24 20:37:01 +02:00
Konrad Malawski
50bf83cc17 Merge pull request #15434 from ktoso/port-persistenceId-ktoso
!per #15230 rename processorId => persistentId (for validation)
2014-06-24 19:33:29 +02:00
Konrad 'ktoso' Malawski
4bb321a83a !per #15230 rename processorId => persistentId
* This is NOT binary compatible, we're in an *experimental* module.
* disabled binary compat checks for package akka.persistence
* Source compatibility is retained, but users should migrate do the new
  method name ASAP.
* Plugin APIs were migrated in a way that allows the old plugins to
  compile agains 2.3.4 without having to change anything. Hopefuly this
  will help authors migrate to 2.3.4 sooner. This is only source level compatible, not binary compatible.
* added deprecation warnings on all processorId methods and provided bridges where possible
* for users, the migration should be painless, they can still override
  the old method, and it'll work. But we encourage them to move to
  persistenceId; All delegation code will have to be removed afterwards ofc.

Conflicts:
	akka-persistence/src/main/scala/akka/persistence/Channel.scala
	akka-persistence/src/main/scala/akka/persistence/JournalProtocol.scala
	akka-persistence/src/main/scala/akka/persistence/Persistent.scala
	akka-persistence/src/main/scala/akka/persistence/PersistentChannel.scala
	akka-persistence/src/main/scala/akka/persistence/Processor.scala
	akka-persistence/src/main/scala/akka/persistence/Snapshot.scala
	akka-persistence/src/main/scala/akka/persistence/journal/AsyncWriteProxy.scala
	akka-persistence/src/main/scala/akka/persistence/journal/inmem/InmemJournal.scala
	akka-persistence/src/main/scala/akka/persistence/journal/leveldb/LeveldbKey.scala
	akka-persistence/src/main/scala/akka/persistence/snapshot/SnapshotStore.scala
	akka-persistence/src/test/scala/akka/persistence/serialization/SerializerSpec.scala
	project/AkkaBuild.scala
2014-06-24 17:05:18 +02:00
Johannes Rudolph
657afbd859 +act #15383 add strict japi.Option.getOrElse to simplify working with options from Java 2014-06-24 13:29:16 +02:00
Konrad Malawski
c8406e3466 Merge pull request #15416 from mkubala/missing-sender-parens-mkubala
=act,clu,con,doc,per,rem,sam #15114 append missing parens at sender invocations
2014-06-24 11:37:43 +02:00
Patrik Nordwall
e51ccf8c57 Merge pull request #15421 from akka/wip-13992-identify-wildcards-master-patriknw
+act #13992 Improve identify replies of wildcard selections (for validation)
2014-06-23 15:03:00 +02:00
Patrik Nordwall
0fd9198f5d +act #13992 Improve identify replies of wildcard selections
(cherry picked from commit 4747b18d66fafb5699168288b09b7f39da5c2e4e)

Conflicts:
	akka-actor/src/main/scala/akka/actor/ActorSelection.scala
	project/AkkaBuild.scala
2014-06-23 12:19:03 +02:00
Marcin Kubala
f4793a399f =act,clu,con,doc,per,rem,sam #15114 append missing parens at Actor.sender() invocations 2014-06-20 23:05:51 +02:00
Konrad 'ktoso' Malawski
67784dbdae =tes #15132 remove not needed lazy val 2014-06-20 16:54:53 +02:00
Konrad Malawski
d35b9a2bb6 Merge pull request #15370 from mkubala/expectMsg-with-hint-mkubala
+tes #15132 Add additional overloaded expectMsg to TestKit
2014-06-20 16:41:06 +02:00
xuwei-k
45ff77e4f9 =act #15395 update typesafe config API URL 2014-06-20 14:45:07 +02:00
Konrad Malawski
ac671c2991 Merge pull request #15381 from ktoso/port-defer
!per PersistentActor#defer (forward port)
2014-06-10 18:40:19 +02:00
Konrad 'ktoso' Malawski
a71790bb18 +per #15229 defer for PersistentActor
* Deferred events are not persisted, thus will not participate in replays
  etc. If users want events to be persisted, they can simply use
  `persistAsync` instead.
* This, 3rd, rewrite extends the Persistent hierarchy by a top level
  trait "Resequenceable", which is used to mark every event to be sent
  in sequence back to the PersistentActor. These are split into
  NonPersistentRepr or PersistentRepr, and acted upon accordingly.
* defer is guaranteed to be called, even after persistence failures
* Includes docs updates for java/scala/java8

Resolves #15229
Depends on #15227

Conflicts:
	akka-docs/rst/scala/code/docs/persistence/PersistenceDocSpec.scala
	akka-persistence/src/main/scala/akka/persistence/JournalProtocol.scala
	akka-persistence/src/main/scala/akka/persistence/Processor.scala
	akka-persistence/src/test/scala/akka/persistence/PersistentActorSpec.scala
	project/AkkaBuild.scala
2014-06-10 17:09:24 +02:00
Björn Antonsson
580b5af816 Merge pull request #15385 from akka/wip-13944-send-marker-message-after-recovery-finished-master-ban
+per #13944 Send RecoveryComplete message at end of recovery (Validation)
2014-06-10 15:06:48 +02:00
Martynas Mickevičius
0cd7252561 Merge pull request #15362 from 2m/pubsub-wrap-before-routing
=con #15285 wrap message in RouterEnvelope before routing (for validation)
2014-06-10 15:09:22 +03:00
Björn Antonsson
9bcaeff87d +per #13944 Send RecoveryComplete message at end of recovery
Fixes #13944

Conflicts:
	akka-docs/rst/scala/code/docs/persistence/PersistenceDocSpec.scala
	akka-persistence/src/main/scala/akka/persistence/Processor.scala
	project/AkkaBuild.scala
2014-06-10 13:22:10 +02:00
Patrik Nordwall
3c9483520a Merge pull request #15382 from akka/wip-15365-UniqueAddress-master-patriknw
+clu #15365 Make cluster.UniqueAddress public (for validation)
2014-06-10 13:07:06 +02:00
Konrad Malawski
8fb9af1cfd Merge pull request #15380 from ktoso/port-persistAsync
!per PersistentActor#persistAsync (forward port)
2014-06-10 12:56:50 +02:00
Martynas Mickevicius
04d5cef3d9 =con #15285 wrap message in RouterEnvelope before routing
PubSubMediator uses router which always unwraps RouterEnvelope messages.
However unwrapping is undesirable if user sends message in
ConsistentHashableEnvelope. Thus PubSubMediator should always wrap user
messages in RouterEnvelope which will be unwrapped by the router, leaving
user message unchanged.

Also disallow consistent hashing routing logic in pub-sub mediator.
2014-06-10 12:46:52 +03:00
Patrik Nordwall
4e9592b4db +clu #15365 Make cluster.UniqueAddress public
(cherry picked from commit 2a2caeebd585d6dde53bbca0125e62626f7bae51)

Conflicts:
	akka-cluster/src/main/scala/akka/cluster/Member.scala
2014-06-10 11:23:23 +02:00
Konrad 'ktoso' Malawski
d51b79c95a !per persistAsync
Breaks binary compatibility because adding new methods to Eventsourced
trait. Since akka-persistence is experimental this is ok, yet
source-level compatibility has been perserved thankfuly :-)

Deprecates:
* Rename of EventsourcedProcessor -> PersistentActor
* Processor -> suggest using PersistentActor
* Migration guide for akka-persistence is separate, as wel'll deprecate in minor versions (its experimental)
* Persistent as well as ConfirmablePersistent - since Processor, their
  main user will be removed soon.

Other changes:
* persistAsync works as expected when mixed with persist
* A counter must be kept for pending stashing invocations
* Uses only 1 shared list buffer for persit / persistAsync
* Includes small benchmark
* Docs also include info about not using Persistent() wrapper
* uses java LinkedList, for best performance of append / head on
  persistInvocations; the get(0) is safe, because these msgs only
  come in response to persistInvocations
* Renamed internal *MessagesSuccess/Failure messages because we kept
  small mistakes seeing the class "with s" and "without s" as the same
* Updated everything that refered to EventsourcedProcessor to
  PersistentActor, including samples

Refs #15227

Conflicts:
	akka-docs/rst/project/migration-guides.rst
	akka-persistence/src/main/scala/akka/persistence/JournalProtocol.scala
	akka-persistence/src/main/scala/akka/persistence/Persistent.scala
	akka-persistence/src/test/scala/akka/persistence/PersistentActorSpec.scala
	project/AkkaBuild.scala
2014-06-10 11:09:12 +02:00
Björn Antonsson
5f3d6029b1 Merge pull request #15376 from akka/wip-13898-failed-SharedLeveldbJournalSpec-master-ban
=per #13898 Make LocalSnapshotStore directory creation more robust (Validation)
2014-06-09 14:06:03 +02:00
Björn Antonsson
05c9d09db3 Merge pull request #15375 from akka/wip-13962-investigate-leveldb-compaction-issue-master-ban
=per #13962 Close LevelDB snapshots to avoid resource leakage (Validation)
2014-06-09 14:05:49 +02:00
Björn Antonsson
6c4f61b405 =per #13898 Make LocalSnapshotStore directory creation more robust 2014-06-09 11:49:26 +02:00
Björn Antonsson
e5a17576cd =per #13962 Close LevelDB snapshots to avoid resource leakage 2014-06-09 11:45:05 +02:00
Marcin Kubala
cdf2bc24d4 +tes #15132 Add additional overloaded expectMsg to TestKit 2014-06-06 21:43:14 +02:00
Patrik Nordwall
e48b6b4185 Merge pull request #15348 from akka/wip-13678-identify-deadLetters-master-patriknw
=act #13678 #15149 Reply with ActorIdentity(None) from deadLetters (for verification)
2014-06-05 12:00:15 +02:00
Konrad Malawski
7ab11c253d Merge pull request #15358 from mkubala/PrettyDurationSpec-fix-mkubala
=tes #15357 fix for PrettyDurationSpec
2014-06-05 10:21:18 +02:00
Björn Antonsson
0c6d584adf Merge pull request #15335 from akka/wip-add-watchSources-for-rst-ban
=pro Add watchSources for *.rst to akka-docs (Forward Port)
2014-06-05 09:40:39 +02:00
Patrik Nordwall
ca4dda10ea =act #13678 #15149 Reply with ActorIdentity(None) from deadLetters
(cherry picked from commit b2f96668baf9efa77de5f97223f055c0a78d0cb8)
2014-06-05 08:28:40 +02:00
Marcin Kubala
a165f6da92 =tes #15357 fix for PrettyDurationSpec 2014-06-04 20:50:26 +02:00
Patrik Nordwall
5cffdd04d4 Merge pull request #15345 from akka/wip-13923-silence-test-log-patriknw
=rem #13923 Mute log and stack traces in RemoteInitErrorSpec
2014-06-04 16:00:10 +02:00
Patrik Nordwall
4a8f24870c =rem #13923 Mute log and stack traces in RemoteInitErrorSpec 2014-06-04 09:16:30 +02:00
Patrik Nordwall
3a12375c5f Merge pull request #15112 from csomogyi/master
=rem #13923 Fixes hanging ActorSystem termination
2014-06-04 08:48:05 +02:00
Martynas Mickevičius
8b21aceb66 Merge pull request #15334 from 2m/wip-update-to-sbt-0.13.5
=proj #15333 Update to sbt 0.13.5
2014-06-03 11:08:36 +02:00
Björn Antonsson
a917e2f816 =pro Add watchSources for *.rst to akka-docs 2014-06-03 10:29:43 +02:00
Martynas Mickevicius
e72945b544 =proj #15333 Update to sbt 0.13.5 2014-06-03 09:49:47 +02:00
Björn Antonsson
ad1a4e9c70 Merge pull request #15324 from akka/wip-15131-snapshotstore-directory-check-master-ban
=per #15131 Make LocalSnapshotStore fail if it can't create target directory (Forward Port)
2014-06-02 16:25:22 +02:00
Björn Antonsson
dff9c61b54 Merge pull request #15323 from akka/wip-15212-make-LocalSnapshotStore-more-robust-master-ban
=per #15212 Avoid half written snapshots in LocalSnapshotStore (Forward Port)
2014-06-02 09:35:47 +02:00
Björn Antonsson
eec1b7ce73 =per #15131 Make LocalSnapshotStore fail if it can't create target directory 2014-06-02 08:40:20 +02:00
Björn Antonsson
2c3c13eddd =per #15212 Avoid half written snapshots in LocalSnapshotStore
Conflicts:
	project/AkkaBuild.scala
2014-05-30 18:20:33 +02:00
Björn Antonsson
f0d18cffe4 Merge pull request #15315 from akka/wip-15265-register-read-ops-master-ban
=act #15265 Enable OP_READ interest for pullMode early ResumeReading (Forward Port)
2014-05-30 18:07:50 +02:00