Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Akka.Persistence - update code base to akka JVM v2.4 #1717

Merged
merged 1 commit into from Mar 1, 2016
Merged

Akka.Persistence - update code base to akka JVM v2.4 #1717

merged 1 commit into from Mar 1, 2016

Conversation

cconstantin
Copy link
Contributor

Resolves #1402.

Some of the changes:

  • Persist on sequence of events should be renamed to PersistAll and works as AtomicWrite (new kind of message) - either all or none events should be written. If journal doesn't support that it should inform about it.
    
  • Rejecting writes - journal can reject saving an event, informing persistent actor about it.
    
  • Obsoleting isPermanent parameter in delete operations - it should be supported for backward compatibility, but for future versions all deletes would be considered a hard ones.
    
  • Deliver support for ActorSelection.
    
  • Removing SyncJournal.
    
  • Renaming all messages with Replay prefix to corresponding Recovery-prefixed equivalents.
    
  • Introduce Recovery config object.
    
  • Sender reference on replayed events should be always DeadLetters.
    
  • Remove Saved method from SnapshotStore.
    

Full list at http://doc.akka.io/docs/akka/current/project/migration-guide-2.3.x-2.4.x.html#Akka_Persistence

Only one thing left to do is to add StateChangeEvent persistence to PersistentFSM, but I believe it can be done is a subsequent release.

@Aaronontheweb Aaronontheweb changed the title [WIP] Akka.Persistence - update code base to akka JVM v2.4 #1402 [WIP] Akka.Persistence - update code base to akka JVM v2.4 #1402 Feb 19, 2016
@cconstantin cconstantin changed the title [WIP] Akka.Persistence - update code base to akka JVM v2.4 #1402 [WIP] Akka.Persistence - update code base to akka JVM v2.4 Feb 19, 2016
@@ -211,39 +212,58 @@ void IDisposable.Dispose()
/// Specific table used for message persistence may be defined through configuration within
/// 'akka.persistence.journal.sql-server' scope with 'schema-name' and 'table-name' keys.
/// </summary>
public async Task WriteMessagesAsync(IEnumerable<IPersistentRepresentation> messages)
public async Task<IImmutableList<Exception>> WriteMessagesAsync(IEnumerable<AtomicWrite> messages)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm pretty sure IEnumerable here is sufficient. It's immutable enough in .NET space.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed. Will change.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, on second thought, IEnumerable is immutable, but the underlying implementation is not guaranteed to be, so it's possible for the creator of the IEnumerable to make changes after passing the reference back. Should we ask for a second opinion @Horusiath? :)

@cconstantin cconstantin changed the title [WIP] Akka.Persistence - update code base to akka JVM v2.4 Akka.Persistence - update code base to akka JVM v2.4 Feb 25, 2016
@cconstantin
Copy link
Contributor Author

Please note that the 3 failing unit tests are as a result of additional checks in TestKit. I'd recommend addressing them after merging this PR.

@Horusiath
Copy link
Contributor

I think it's good. Eventual changes can be implemented in separate steps. However when it comes to failing tests, they must be either fixed or skipped - without that merging this to dev will doom our CI for all other PRs waiting to be merged.

@@ -13,9 +14,11 @@ namespace Akka.Persistence.TestKit.Tests
public class MemoryJournalSpec : JournalSpec
{
public MemoryJournalSpec(ITestOutputHelper output)
: base(actorSystemName: "MemoryJournalSpec", output: output)
: base(typeof(MemoryJournal), "MemoryJournalSpec")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing output propagation to base constructor - this will cause xUnit parallel tests to not print any results.

@cconstantin
Copy link
Contributor Author

@Horusiath should I open new issues for the two tests (one for journals, one for snapshot stores) that test behavior not supported yet?

@cconstantin
Copy link
Contributor Author

@Aaronontheweb I believe this is ready to be merged. Some work will be needed on updating the documentation, and to update the journals and event stores. There's also a bug in JVM akka-persistence that I'm following and will submit a PR as soon as they agree on a fix (it seems quite serious: akka/akka#19828).

@Horusiath
Copy link
Contributor

@cconstantin please open the issues for these tests - we don't want to forget them.

@cconstantin
Copy link
Contributor Author

@Aaronontheweb @Horusiath should I squash all commits into one before merging?

@Aaronontheweb
Copy link
Member

@cconstantin yes please!

@cconstantin
Copy link
Contributor Author

@Aaronontheweb done

Horusiath added a commit that referenced this pull request Mar 1, 2016
Akka.Persistence - update code base to akka JVM v2.4
@Horusiath Horusiath merged commit e793682 into akkadotnet:dev Mar 1, 2016
@cconstantin cconstantin deleted the akka-persistence-jvm-2.4 branch March 1, 2016 15:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Akka.Persistence - update code base to akka JVM v2.4
4 participants