Open Aaronontheweb opened 3 years ago
Worth noting: the actual delete and purge routines inside https://github.com/petabridge/Akka.Cluster.Sharding.RepairTool will stick work fine with Redis. Just not the tools for querying the journal to find the shardRegions before deleting them.
Is your feature request related to a problem? Please describe. While adding some integration tests for our Akka.Cluster.Sharding persistence cleanup tool, I ran into a small problem on this PR: https://github.com/petabridge/Akka.Cluster.Sharding.RepairTool/pull/7 - Akka.Persistence.Redis'
IReadJournal
does not supportICurrentPersistenceIds()
.I know we removed it as part of https://github.com/akkadotnet/Akka.Persistence.Redis/issues/126 because we thought it'd be too expensive to implement in clustered redis scenarios, but I wonder if that's true.
Describe the solution you'd like The "all events" and "events by tag" queries are out of the question - they're expensive because they can't effectively be cleaned up in a clustered environment without some kind of inter-node index and we're not database architects so we're not going to build one. Users can use a relational database for that.
But Akka.Persistence requires us to keep track of all used PersistentIds even after the entities have had all of their data purged - we're required to keep those records in perpetuity and therefore cleanup is not an issue.
So, I suppose we can try implementing the
ICurrentPersistentId
s andIPersistentId
s queries in one of two ways:Describe alternatives you've considered We could also go on not doing this, but since we're taking a dependency on
ICurrentPersistentIds
for helping Cluster.Sharding users cleanup I'd like to do our best to support it.