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

Batching journal not working with Akka.Persistence v1.4.11 #177

Closed
raskolnikoov opened this issue Nov 9, 2020 · 8 comments · Fixed by #178
Closed

Batching journal not working with Akka.Persistence v1.4.11 #177

raskolnikoov opened this issue Nov 9, 2020 · 8 comments · Fixed by #178
Assignees

Comments

@raskolnikoov
Copy link

Hi,

Seems to be some errors when using the latest Akka.Persistence v1.4.11 with Akka.Persistence.SqlServer v.1.4.10 and SqlServer Batching journal.

Upon upstart this error is thrown. If I switch to standard SqlServer journal it works.

[akka://OMP/system/akka.persistence.journal.sql-server#1258631903]: Akka.Actor.ActorInitializationException: Exception during creation ---> System.TypeLoadException: Error while creating actor instance of type Akka.Persistence.SqlServer.Journal.BatchingSqlServerJournal with 1 args: ( class : "Akka.Persistence.SqlServer.Journal.BatchingSqlServerJournal, Akka.Persistence.SqlServer" max-concurrent-operations : 64 max-batch-size : 100 max-buffer-size : 1000000 plugin-dispatcher : akka.actor.default-dispatcher connection-string : Server=localhost;Database=MyFancyDb;Trusted_Connection=True;MultipleActiveResultSets=True; connection-timeout : 60s schema-name : dbo table-name : MyFancy_Persistance_EventJournal auto-initialize : on timestamp-provider : "Akka.Persistence.Sql.Common.Journal.DefaultTimestampProvider, Akka.Persistence.Sql.Common" metadata-table-name : MyFancy_Persistance_Metadata circuit-breaker : { call-timeout : 80s } ) ---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.MissingMethodException: Method not found: 'Akka.Pattern.CircuitBreaker Akka.Pattern.CircuitBreaker.Create(Int32, System.TimeSpan, System.TimeSpan)'. at Akka.Persistence.Sql.Common.Journal.BatchingSqlJournal2..ctor(BatchingSqlJournalSetup setup)
at Akka.Persistence.SqlServer.Journal.BatchingSqlServerJournal..ctor(BatchingSqlServerJournalSetup setup)
at Akka.Persistence.SqlServer.Journal.BatchingSqlServerJournal..ctor(Config config)
--- End of inner exception stack trace ---
at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor, Boolean wrapExceptions)
at System.Reflection.RuntimeConstructorInfo.Invoke(BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture) at System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes)
at System.Activator.CreateInstance(Type type, Object[] args)
at Akka.Actor.Props.ActivatorProducer.Produce()
at Akka.Actor.Props.NewActor()
--- End of inner exception stack trace ---
at Akka.Actor.Props.NewActor()
at Akka.Actor.ActorCell.CreateNewActorInstance()
at Akka.Actor.ActorCell.<>c__DisplayClass117_0.b__0()
at Akka.Actor.ActorCell.UseThreadContext(Action action)
at Akka.Actor.ActorCell.NewActor()
at Akka.Actor.ActorCell.Create(Exception failure)
--- End of inner exception stack trace ---
at Akka.Actor.ActorCell.Create(Exception failure)
at Akka.Actor.ActorCell.SysMsgInvokeAll(EarliestFirstSystemMessageList messages, Int32 currentState)`

@ismaelhamed
Copy link
Member

ismaelhamed commented Nov 10, 2020

Latest Akka release introduced a breaking change in the Circuit Breaker, so this plug-in might need to be recompiled against 1.4.11

@ismaelhamed
Copy link
Member

Actually, no. I just upgraded our solution, and it seems to be working fine. Can you make sure all the Akka.*.dll are actually on v1.4.11?

@Aaronontheweb
Copy link
Member

@ismaelhamed should we just push the v1.4.11 version of Akka.Persistence.Sql with the updated dependencies?

@raskolnikoov
Copy link
Author

Please do push an update since I was not referencing Akka.Persistence v1.4.11 in my project but only Akka.Persistence.SqlServer and therefore we have this bug when other akka packages are v1.4.11.

@ismaelhamed
Copy link
Member

@Aaronontheweb yes, like @raskolnikoov said it'd be better from a user experience perspective to release a v1.4.11 for the SqlServer plugin. Otherwise, user must manually update all the Akka.Persistence.* libraries himself.

@raskolnikoov
Copy link
Author

@ismaelhamed I tried to install Akka.Persistence also in my app but I still get the same issue as before. It was resolved when I also installed Akka.Persistence.Sql.Common to v.1.4.11.

@ismaelhamed
Copy link
Member

@raskolnikoov That's what I meant before. Because we cannot always guarantee backward compatibility, IMO users must make sure all Akka core packages are always on the same version. In this case, it would've been more straightforward if the SqlServer plugin had pulled down the latest version for its dependencies.

@Aaronontheweb
Copy link
Member

@ismaelhamed @raskolnikoov got it - I'll push an update to Akka.Persistence.SqlServer and some of the other Akka.Persistence plugins today then.

@Aaronontheweb Aaronontheweb added this to To do in Oct 26 - Nov 6 Sprint via automation Nov 11, 2020
@Aaronontheweb Aaronontheweb self-assigned this Nov 11, 2020
Aaronontheweb added a commit that referenced this issue Nov 11, 2020
Oct 26 - Nov 6 Sprint automation moved this from To do to Done Nov 11, 2020
Aaronontheweb added a commit that referenced this issue Nov 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Development

Successfully merging a pull request may close this issue.

3 participants