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

DData: PNCounterDictionary throws ArgumentException during pruning #4199

Closed
Aaronontheweb opened this issue Feb 11, 2020 · 0 comments · Fixed by #4196
Closed

DData: PNCounterDictionary throws ArgumentException during pruning #4199

Aaronontheweb opened this issue Feb 11, 2020 · 0 comments · Fixed by #4196
Assignees
Milestone

Comments

@Aaronontheweb
Copy link
Member

Found another bug once I fixed the leader selection code with the Replicator:

[Node #2(second)]Cause: System.ArgumentException: An element with the same key but a different value already exists. Key: y
[Node #2(second)]   at System.Collections.Immutable.ImmutableDictionary`2.HashBucket.Add(TKey key, TValue value, IEqualityComparer`1 keyOnlyComparer, IEqualityComparer`1 valueComparer, KeyCollisionBehavior behavior, OperationResult& result)
[Node #2(second)]   at System.Collections.Immutable.ImmutableDictionary`2.AddRange(IEnumerable`1 items, MutationInput origin, KeyCollisionBehavior collisionBehavior)
[Node #2(second)]   at System.Collections.Immutable.ImmutableDictionary`2.AddRange(IEnumerable`1 pairs, Boolean avoidToHashMap)
[Node #2(second)]   at Akka.DistributedData.ORSet`1.Prune(UniqueAddress removedNode, UniqueAddress collapseInto) in C:\Repositories\olympus\akka.net\src\contrib\cluster\Akka.DistributedData\ORSet.cs:line 353
[Node #2(second)]   at Akka.DistributedData.ORDictionary`2.Prune(UniqueAddress removedNode, UniqueAddress collapseInto) in C:\Repositories\olympus\akka.net\src\contrib\cluster\Akka.DistributedData\ORDictionary.cs:line 308
[Node #2(second)]   at Akka.DistributedData.PNCounterDictionary`1.Prune(UniqueAddress removedNode, UniqueAddress collapseInto) in C:\Repositories\olympus\akka.net\src\contrib\cluster\Akka.DistributedData\PNCounterDictionary.cs:line 154
[Node #2(second)]   at Akka.DistributedData.Internal.DataEnvelope.Prune(UniqueAddress from, PruningPerformed pruningPerformed) in C:\Repositories\olympus\akka.net\src\contrib\cluster\Akka.DistributedData\Internal\Internal.cs:line 431
[Node #2(second)]   at Akka.DistributedData.Replicator.PerformRemovedNodePruning() in C:\Repositories\olympus\akka.net\src\contrib\cluster\Akka.DistributedData\Replicator.cs:line 1362
[Node #2(second)]   at Akka.DistributedData.Replicator.ReceiveRemovedNodePruningTick() in C:\Repositories\olympus\akka.net\src\contrib\cluster\Akka.DistributedData\Replicator.cs:line 1275
[Node #2(second)]   at lambda_method(Closure , Object , Action`1 , Action`1 , Action`1 , Action`1 , Action`1 , Action`1 , Action`1 , Action`1 , Action`1 , Action`1 , Action`1 , Action`1 , Action`1 , Action`1 , Object[] )
[Node #2(second)]   at Akka.Tools.MatchHandler.PartialHandlerArgumentsCapture`16.Handle(T value) in C:\Repositories\olympus\akka.net\src\core\Akka\Util\MatchHandler\PartialHandlerArgumentsCapture.cs:line 761
[Node #2(second)]   at Akka.Actor.ReceiveActor.ExecutePartialMessageHandler(Object message, PartialAction`1 partialAction) in C:\Repositories\olympus\akka.net\src\core\Akka\Actor\ReceiveActor.cs:line 78
[Node #2(second)]   at Akka.Actor.UntypedActor.Receive(Object message) in C:\Repositories\olympus\akka.net\src\core\Akka\Actor\UntypedActor.cs:line 27
[Node #2(second)]   at Akka.Actor.ActorBase.AroundReceive(Receive receive, Object message) in C:\Repositories\olympus\akka.net\src\core\Akka\Actor\ActorBase.cs:line 158
[Node #2(second)]   at Akka.Actor.ActorCell.ReceiveMessage(Object message) in C:\Repositories\olympus\akka.net\src\core\Akka\Actor\ActorCell.DefaultMessages.cs:line 177
[Node #2(second)]   at Akka.Actor.ActorCell.Invoke(Envelope envelope) in C:\Repositories\olympus\akka.net\src\core\Akka\Actor\ActorCell.DefaultMessages.cs:line 83

Originally posted by @Aaronontheweb in #4196 (comment)

@Aaronontheweb Aaronontheweb self-assigned this Feb 11, 2020
@Aaronontheweb Aaronontheweb added this to the 1.4.0 milestone Feb 11, 2020
Aaronontheweb added a commit to Aaronontheweb/akka.net that referenced this issue Feb 11, 2020
Aaronontheweb added a commit to Aaronontheweb/akka.net that referenced this issue Feb 11, 2020
needed to call ImmutableDictionary.SetItems rather than AddRange
Aaronontheweb added a commit that referenced this issue Feb 11, 2020
* close #3080 - enabled DData MNTR ReplicatorPruningSpec

* cleaning up ReplicatorPruningSpec

* syntax cleanup on PNCounterDictionary

* introduced standalone reproduction spec for #4198

* reorganized ReplicatorPruningSpec

* Added simpler reproduction spec for #4198

* close #4198 - fixed PNCounterDictionary merge bug

* modified ReplicatorPruningSpec HOCON

* fixed Replicator leader tracking

* added reproduction for #4199

* close #4199

needed to call ImmutableDictionary.SetItems rather than AddRange

* modernized CollectRemoveNodes call in Replicator

* adding reproduction specs for #4200

* added missing pruning-marker-time-to-live setting to HOCON

one of the causes of #4200

* fixed ReplicatorPruningSpec to intentionally try to corrupt data from old node

* made it easier to tell ReadAggregator / WriteAggregator apart while debugging
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant