Comments (11)
Exception points to problems with deserializing type AA
which is trying to get located in Akka.Persistence.PostgreSQL. I guess this is your custom type. What serializer have you picked up for it?
from akka.persistence.postgresql.
Hey @Horusiath
I should have mentioned this is the system shard coordinator which is failing to start.
From what I can see it's correctly stored the key AA as its pseudo "type" https://github.com/akkadotnet/akka.net/blob/dev/src/contrib/cluster/Akka.Cluster.Sharding/Serialization/ClusterShardingMessageSerializer.cs#L28 however it looks to me like Akka.Persistence.PostgreSQL
is actually trying to create a new type of this constant value rather than follow the deserialization code path.
My setup doesn't make use of any custom serialization - everything should be using the defaults which I believe is Protobuf.
Thanks for your help!
from akka.persistence.postgresql.
@dubs999 Cluster sharding has its own dedicated serializer, which interprets manifests differently than akka default message serializer. Having that error message message means, that default is tried to being used on message deserialization.
Most probably you haven't included ClusterSharding.DefaultConfig()
as a fallback configuration in your actor system:
var system = ActorSystem.Create("system", myConfig.WithFallback(ClusterSharding.DefaultConfig()));
from akka.persistence.postgresql.
Hey @Horusiath
I've copied and pasted the setup I'm using below. I have the fallback configuration already declared. Sorry if this is going off topic but we didnt cover persistence module setup in quite as much detail during Aaron's course.
Is there any additional fallback modules that are required for persistence/sharding?
var config = ConfigurationFactory
.ParseString(Hocon())
.WithFallback(ClusterSharding.DefaultConfig());
var system = ActorSystem.Create("my-system", config);
var sharding = ClusterSharding.Get(system);
var settings = ClusterShardingSettings
.Create(system)
.WithRole("transaction-v1");
ShardRegion = sharding.Start(
"collect",
Props.Create<CollectTransactionActor>(),
settings,
new MessageExtractor());
from akka.persistence.postgresql.
I don't know whether this is an over simplification but this is the line which appears to blow up.
from akka.persistence.postgresql.
I've got a simple app which can repro this bug fairly easily. I've lowered the threshold at which a snapshot is taken to 10 to make the turnaround a bit more rapid.
https://github.com/dubs999/akka.net-cluster-sharding
Steps
- Load app
- Hit localhost:4010/[any-string]
- Repeat step 2 a few times to cause enough coordinator to reach 10+ journal entries (restarts seem to also cause more journal entries - I'm not 100% sure what the criteria is for creating these entries).
- Stop the app, restart it and see the Cluster application error on startup.
If there is anything obvious that's missing with this example then that would be super helpful.
Let me know if I can help in any other way.
Dan
from akka.persistence.postgresql.
You're right, @dubs999 . This is a bug.
from akka.persistence.postgresql.
Thanks @Horusiath
I guess I have a couple of options.
- I push up the limit at which a snapshot occurs to a really high number and run my application off of journal entries (until such time as the bug is fixed).
- I use an alternative persistence plugin.
Do you have customers which are using persistent sharding in production? If so, do you know which persistence plugin they are using?
We may also have some time to contribute a fix however our release deadline is fairly tight and I assume a public build wont be available in the very near term.
Many thanks
from akka.persistence.postgresql.
I know about several projects using Akka.Persistence.SqlServer. If I'm right redis plugin also should work, and mongodb plugin was modified some time ago specifically to also expose cluster sharding compatibility. Another option is to use cluster sharding in akka.cluster.sharding.state-store-mode = ddata
mode, which doesn't need any persistence, however it won't allow you to use akka.cluster.sharding.remember-entities
option.
from akka.persistence.postgresql.
I've submitted a PR which fixes the issue (when tested locally). I've not got a great deal of exposure to the Akka framework so apologies if the fix isn't robust enough.
Thank you for all your help guys!
from akka.persistence.postgresql.
Closed via #60
from akka.persistence.postgresql.
Related Issues (20)
- Broken license link in NuGet Package HOT 1
- [Regression] Updating Npgsql to 6.0.1 broke netcoreapp3.1 support for Entity Framework
- Recovery can return items out of order
- [PERF] Use DbBatch to increase PersistAll performance
- [BUG] Akka.Persistence.PostgreSql does not support `writerUUID` field
- Snapshot deletion: null value in column "is_deleted" of relation "snapshot_store" violates not-null constraint HOT 1
- Implement DbDataSource HOT 1
- jsonb serialization snapshot manifest instead of qualified name uses manifest of SerializerWithStringManifest
- Please indicate that this project is scheduled for deprecation in Akka.Net 1.16 HOT 3
- Support the driver returning JObject instead of string for Jsonb HOT 1
- Used table format leaks to SnapshotOffer HOT 3
- Intermittently, only latest journal entry is sent to actor as SnapshotOffer HOT 8
- Move to IDENTITY column for ordering? HOT 4
- Akka 1.4 support HOT 1
- Migrate PostgreSql tests to Docker.NET
- Implement modern Akka.Persistence.Query for Postgres HOT 1
- Snapshots - Deserialize Serialization.WithTransport missing?
- Identical tests? HOT 1
- Setting SerializerId twice HOT 2
- Snapshots Deserialize to JObject and then ignored HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from akka.persistence.postgresql.