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

Performance optimize VectorClock #4952

Merged

Conversation

Aaronontheweb
Copy link
Member

Starting a thread for optimizing the VectorClock class, which is heavily used in all Gossip and decision-making inside the cluster.

part of #4849

@Aaronontheweb
Copy link
Member Author

Initial performance:

BenchmarkDotNet=v0.12.1, OS=Windows 10.0.19042
Intel Core i7-3630QM CPU 2.40GHz (Ivy Bridge), 1 CPU, 8 logical and 4 physical cores
.NET Core SDK=5.0.201
  [Host]     : .NET Core 3.1.13 (CoreCLR 4.700.21.11102, CoreFX 4.700.21.11602), X64 RyuJIT
  DefaultJob : .NET Core 3.1.13 (CoreCLR 4.700.21.11102, CoreFX 4.700.21.11602), X64 RyuJIT

Method ClockSize Iterations Mean Error StdDev Median Gen 0 Gen 1 Gen 2 Allocated
VectorClock_comparisons_should_compare_same 100 1000 107.676 ms 2.1467 ms 3.6453 ms 106.644 ms 10250.0000 - - 31.22 MB
VectorClock_comparisons_should_compare_Before_last 100 1000 106.424 ms 1.9701 ms 2.0231 ms 105.854 ms 10400.0000 - - 31.22 MB
VectorClock_comparisons_should_compare_After_last 100 1000 104.143 ms 1.4832 ms 1.3148 ms 103.879 ms 10400.0000 - - 31.22 MB
VectorClock_comparisons_should_compare_Concurrent_last 100 1000 101.957 ms 0.7566 ms 0.7077 ms 101.853 ms 10200.0000 - - 30.93 MB
VectorClock_comparisons_should_compare_Before_middle 100 1000 103.613 ms 0.6541 ms 0.5462 ms 103.593 ms 10400.0000 - - 31.22 MB
VectorClock_comparisons_should_compare_After_middle 100 1000 103.514 ms 1.2215 ms 1.0828 ms 103.222 ms 10400.0000 - - 31.22 MB
VectorClock_comparisons_should_compare_Concurrent_middle 100 1000 53.353 ms 1.0536 ms 1.8727 ms 52.608 ms 5400.0000 - - 16.35 MB
VectorClock_comparisons_should_compare_notEquals_Before_Middle 100 1000 52.512 ms 0.1767 ms 0.1475 ms 52.518 ms 5400.0000 - - 16.32 MB
VectorClock_comparisons_should_compare_notEquals_After_Middle 100 1000 2.273 ms 0.0170 ms 0.0159 ms 2.267 ms 480.4688 - - 1.44 MB
VectorClock_comparisons_should_compare_notEquals_Concurrent_Middle 100 1000 2.407 ms 0.0475 ms 0.1309 ms 2.342 ms 480.4688 - - 1.44 MB
VectorClock_comparisons_should_compare_same 500 1000 525.029 ms 3.2744 ms 3.0628 ms 524.694 ms 50000.0000 - - 150.74 MB
VectorClock_comparisons_should_compare_Before_last 500 1000 582.564 ms 14.6381 ms 42.6999 ms 583.669 ms 50000.0000 - - 150.74 MB
VectorClock_comparisons_should_compare_After_last 500 1000 625.386 ms 22.6974 ms 62.8943 ms 617.122 ms 50000.0000 - - 150.74 MB
VectorClock_comparisons_should_compare_Concurrent_last 500 1000 637.905 ms 14.6447 ms 41.0654 ms 631.268 ms 50000.0000 - - 150.44 MB
VectorClock_comparisons_should_compare_Before_middle 500 1000 652.445 ms 23.8089 ms 65.5766 ms 639.658 ms 50000.0000 - - 150.74 MB
VectorClock_comparisons_should_compare_After_middle 500 1000 549.772 ms 10.9936 ms 18.6680 ms 544.768 ms 50000.0000 - - 150.74 MB
VectorClock_comparisons_should_compare_Concurrent_middle 500 1000 277.979 ms 5.5424 ms 7.0093 ms 275.442 ms 25000.0000 - - 76.36 MB
VectorClock_comparisons_should_compare_notEquals_Before_Middle 500 1000 273.266 ms 5.2289 ms 4.6353 ms 272.835 ms 25000.0000 - - 76.34 MB
VectorClock_comparisons_should_compare_notEquals_After_Middle 500 1000 3.966 ms 0.0764 ms 0.0909 ms 3.946 ms 644.5313 - - 1.94 MB
VectorClock_comparisons_should_compare_notEquals_Concurrent_Middle 500 1000 3.841 ms 0.0516 ms 0.0458 ms 3.850 ms 644.5313 - - 1.94 MB
VectorClock_comparisons_should_compare_same 1000 1000 1,148.996 ms 22.8402 ms 46.1384 ms 1,139.100 ms 100000.0000 - - 300.18 MB
VectorClock_comparisons_should_compare_Before_last 1000 1000 1,134.320 ms 22.3642 ms 32.7811 ms 1,130.709 ms 100000.0000 - - 300.18 MB
VectorClock_comparisons_should_compare_After_last 1000 1000 1,129.081 ms 22.4063 ms 39.8271 ms 1,126.092 ms 100000.0000 - - 300.18 MB
VectorClock_comparisons_should_compare_Concurrent_last 1000 1000 1,171.121 ms 23.1919 ms 39.3817 ms 1,168.987 ms 100000.0000 - - 299.9 MB
VectorClock_comparisons_should_compare_Before_middle 1000 1000 1,153.102 ms 21.7915 ms 47.8329 ms 1,142.044 ms 100000.0000 - - 300.18 MB
VectorClock_comparisons_should_compare_After_middle 1000 1000 1,165.462 ms 21.4579 ms 42.8537 ms 1,160.951 ms 100000.0000 - - 300.18 MB
VectorClock_comparisons_should_compare_Concurrent_middle 1000 1000 562.510 ms 11.1177 ms 12.8031 ms 559.310 ms 50000.0000 - - 151.42 MB
VectorClock_comparisons_should_compare_notEquals_Before_Middle 1000 1000 565.227 ms 11.1986 ms 26.3964 ms 558.644 ms 50000.0000 - - 151.39 MB
VectorClock_comparisons_should_compare_notEquals_After_Middle 1000 1000 6.511 ms 0.1530 ms 0.4487 ms 6.373 ms 867.1875 - - 2.62 MB
VectorClock_comparisons_should_compare_notEquals_Concurrent_Middle 1000 1000 6.324 ms 0.1252 ms 0.3384 ms 6.283 ms 867.1875 - - 2.62 MB

Going to drop the 500, 1000 node tests until I can get baseline performance up as these tests take several minutes to run on this machine

@Aaronontheweb
Copy link
Member Author

First change - caching the MD5 instance in a ThreadStatic variable rather than creating new ones all the time.

@Aaronontheweb
Copy link
Member Author

BenchmarkDotNet=v0.12.1, OS=Windows 10.0.19042
Intel Core i7-3630QM CPU 2.40GHz (Ivy Bridge), 1 CPU, 8 logical and 4 physical cores
.NET Core SDK=5.0.201
  [Host]     : .NET Core 3.1.13 (CoreCLR 4.700.21.11102, CoreFX 4.700.21.11602), X64 RyuJIT
  DefaultJob : .NET Core 3.1.13 (CoreCLR 4.700.21.11102, CoreFX 4.700.21.11602), X64 RyuJIT

Method ClockSize Iterations Mean Error StdDev Median Gen 0 Gen 1 Gen 2 Allocated
VectorClock_comparisons_should_compare_same 100 1000 104.429 ms 1.9871 ms 2.2883 ms 103.778 ms 10000.0000 - - 31.22 MB
VectorClock_comparisons_should_compare_Before_last 100 1000 107.136 ms 2.1310 ms 5.0646 ms 105.067 ms 10250.0000 - - 31.22 MB
VectorClock_comparisons_should_compare_After_last 100 1000 110.656 ms 1.6880 ms 2.3663 ms 110.956 ms 10400.0000 - - 31.22 MB
VectorClock_comparisons_should_compare_Concurrent_last 100 1000 104.912 ms 2.0884 ms 2.7155 ms 104.410 ms 10200.0000 - - 30.93 MB
VectorClock_comparisons_should_compare_Before_middle 100 1000 107.446 ms 1.9863 ms 3.3730 ms 106.836 ms 10250.0000 - - 31.22 MB
VectorClock_comparisons_should_compare_After_middle 100 1000 104.568 ms 2.0652 ms 1.7246 ms 105.039 ms 10400.0000 - - 31.22 MB
VectorClock_comparisons_should_compare_Concurrent_middle 100 1000 54.175 ms 0.8361 ms 0.7821 ms 54.388 ms 5400.0000 - - 16.35 MB
VectorClock_comparisons_should_compare_notEquals_Before_Middle 100 1000 54.320 ms 1.0849 ms 2.7810 ms 52.857 ms 5400.0000 - - 16.32 MB
VectorClock_comparisons_should_compare_notEquals_After_Middle 100 1000 2.221 ms 0.0193 ms 0.0180 ms 2.216 ms 480.4688 - - 1.44 MB
VectorClock_comparisons_should_compare_notEquals_Concurrent_Middle 100 1000 2.242 ms 0.0198 ms 0.0165 ms 2.241 ms 480.4688 - - 1.44 MB

No real changes - probably because we're not creating new Node instances very often inside the source code. We weren't properly disposing of the MD5 instances before either, so caching the algorithm uniquely per-thread should help improve some of the performance when new nodes are joining the cluster.

@Aaronontheweb
Copy link
Member Author

Looks like caching actually broke the cluster to boot. I'll roll that back and just safely dispose of it.

@Aaronontheweb
Copy link
Member Author

Guaranteed disposal of the IEnumerator<T> instances used by VectorClock.Compare - didn't improve throughput but it did reduce memory allocation some. This was a bit of a resource leak in the first place, so it's a good fix.

BenchmarkDotNet=v0.12.1, OS=Windows 10.0.19042
Intel Core i7-3630QM CPU 2.40GHz (Ivy Bridge), 1 CPU, 8 logical and 4 physical cores
.NET Core SDK=5.0.201
  [Host]     : .NET Core 3.1.13 (CoreCLR 4.700.21.11102, CoreFX 4.700.21.11602), X64 RyuJIT
  DefaultJob : .NET Core 3.1.13 (CoreCLR 4.700.21.11102, CoreFX 4.700.21.11602), X64 RyuJIT

Method ClockSize Iterations Mean Error StdDev Gen 0 Gen 1 Gen 2 Allocated
VectorClock_comparisons_should_compare_same 100 1000 107.055 ms 1.3954 ms 1.3053 ms 10250.0000 - - 30.94 MB
VectorClock_comparisons_should_compare_Before_last 100 1000 106.647 ms 2.0548 ms 3.0119 ms 10200.0000 - - 30.94 MB
VectorClock_comparisons_should_compare_After_last 100 1000 105.659 ms 2.0076 ms 1.9717 ms 10200.0000 - - 30.94 MB
VectorClock_comparisons_should_compare_Concurrent_last 100 1000 105.185 ms 2.0028 ms 2.8724 ms 10200.0000 - - 30.65 MB
VectorClock_comparisons_should_compare_Before_middle 100 1000 107.235 ms 2.1117 ms 3.4695 ms 10200.0000 - - 30.94 MB
VectorClock_comparisons_should_compare_After_middle 100 1000 104.620 ms 1.9549 ms 1.9200 ms 10200.0000 - - 30.94 MB
VectorClock_comparisons_should_compare_Concurrent_middle 100 1000 55.050 ms 1.0274 ms 0.9108 ms 5300.0000 - - 16.07 MB
VectorClock_comparisons_should_compare_notEquals_Before_Middle 100 1000 54.935 ms 0.8350 ms 0.7811 ms 5300.0000 - - 16.04 MB
VectorClock_comparisons_should_compare_notEquals_After_Middle 100 1000 2.512 ms 0.0465 ms 0.0388 ms 386.7188 - - 1.16 MB
VectorClock_comparisons_should_compare_notEquals_Concurrent_Middle 100 1000 2.505 ms 0.0493 ms 0.0914 ms 386.7188 - - 1.16 MB

@Aaronontheweb
Copy link
Member Author

Switched to using local function over explicit Func declaration - some minor gains:

BenchmarkDotNet=v0.12.1, OS=Windows 10.0.19042
Intel Core i7-3630QM CPU 2.40GHz (Ivy Bridge), 1 CPU, 8 logical and 4 physical cores
.NET Core SDK=5.0.201
  [Host]     : .NET Core 3.1.13 (CoreCLR 4.700.21.11102, CoreFX 4.700.21.11602), X64 RyuJIT
  DefaultJob : .NET Core 3.1.13 (CoreCLR 4.700.21.11102, CoreFX 4.700.21.11602), X64 RyuJIT

Method ClockSize Iterations Mean Error StdDev Gen 0 Gen 1 Gen 2 Allocated
VectorClock_comparisons_should_compare_same 100 1000 103.611 ms 1.0131 ms 0.8460 ms 10250.0000 - - 30.84 MB
VectorClock_comparisons_should_compare_Before_last 100 1000 104.002 ms 1.0423 ms 0.9240 ms 10200.0000 - - 30.84 MB
VectorClock_comparisons_should_compare_After_last 100 1000 103.769 ms 0.7868 ms 0.6570 ms 10200.0000 - - 30.84 MB
VectorClock_comparisons_should_compare_Concurrent_last 100 1000 103.740 ms 0.6128 ms 0.5732 ms 10200.0000 - - 30.54 MB
VectorClock_comparisons_should_compare_Before_middle 100 1000 103.898 ms 0.7132 ms 0.6672 ms 10200.0000 - - 30.84 MB
VectorClock_comparisons_should_compare_After_middle 100 1000 104.395 ms 1.1634 ms 1.0882 ms 10200.0000 - - 30.84 MB
VectorClock_comparisons_should_compare_Concurrent_middle 100 1000 53.469 ms 0.4211 ms 0.3516 ms 5300.0000 - - 15.97 MB
VectorClock_comparisons_should_compare_notEquals_Before_Middle 100 1000 53.466 ms 0.3133 ms 0.2777 ms 5300.0000 - - 15.93 MB
VectorClock_comparisons_should_compare_notEquals_After_Middle 100 1000 2.399 ms 0.0188 ms 0.0166 ms 351.5625 - - 1.06 MB
VectorClock_comparisons_should_compare_notEquals_Concurrent_Middle 100 1000 2.621 ms 0.0205 ms 0.0182 ms 351.5625 - - 1.06 MB

@Aaronontheweb
Copy link
Member Author

Tried replacing tail recursion with a loop - didn't make any real difference IMHO:

BenchmarkDotNet=v0.12.1, OS=Windows 10.0.19042
Intel Core i7-3630QM CPU 2.40GHz (Ivy Bridge), 1 CPU, 8 logical and 4 physical cores
.NET Core SDK=5.0.201
  [Host]     : .NET Core 3.1.13 (CoreCLR 4.700.21.11102, CoreFX 4.700.21.11602), X64 RyuJIT
  DefaultJob : .NET Core 3.1.13 (CoreCLR 4.700.21.11102, CoreFX 4.700.21.11602), X64 RyuJIT

Method ClockSize Iterations Mean Error StdDev Gen 0 Gen 1 Gen 2 Allocated
VectorClock_comparisons_should_compare_same 100 1000 107.075 ms 1.1924 ms 1.1154 ms 10200.0000 - - 30.84 MB
VectorClock_comparisons_should_compare_Before_last 100 1000 99.214 ms 1.9021 ms 1.6861 ms 10166.6667 - - 30.84 MB
VectorClock_comparisons_should_compare_After_last 100 1000 100.295 ms 1.4786 ms 1.3831 ms 10166.6667 - - 30.84 MB
VectorClock_comparisons_should_compare_Concurrent_last 100 1000 98.187 ms 0.7685 ms 0.6813 ms 10166.6667 - - 30.54 MB
VectorClock_comparisons_should_compare_Before_middle 100 1000 102.094 ms 2.0340 ms 4.0150 ms 10166.6667 - - 30.83 MB
VectorClock_comparisons_should_compare_After_middle 100 1000 102.708 ms 1.8743 ms 1.7532 ms 10166.6667 - - 30.84 MB
VectorClock_comparisons_should_compare_Concurrent_middle 100 1000 51.571 ms 1.0257 ms 1.0533 ms 5300.0000 - - 15.96 MB
VectorClock_comparisons_should_compare_notEquals_Before_Middle 100 1000 52.284 ms 1.0455 ms 1.3222 ms 5300.0000 - - 15.93 MB
VectorClock_comparisons_should_compare_notEquals_After_Middle 100 1000 2.477 ms 0.0145 ms 0.0135 ms 351.5625 - - 1.06 MB
VectorClock_comparisons_should_compare_notEquals_Concurrent_Middle 100 1000 2.337 ms 0.0171 ms 0.0152 ms 351.5625 - - 1.06 MB

@Aaronontheweb
Copy link
Member Author

replaced KeyValuePair<TKey,TValue> with ValueTuple<TKey,TValue> inside comparison method.

Reduced allocations by 90%, decreased execution time from 100ms to ~40ms

I had no idea KeyValuePair<,>.Equals was so expensive, but apparently it is...

BenchmarkDotNet=v0.12.1, OS=Windows 10.0.19042
Intel Core i7-3630QM CPU 2.40GHz (Ivy Bridge), 1 CPU, 8 logical and 4 physical cores
.NET Core SDK=5.0.201
  [Host]     : .NET Core 3.1.13 (CoreCLR 4.700.21.11102, CoreFX 4.700.21.11602), X64 RyuJIT
  DefaultJob : .NET Core 3.1.13 (CoreCLR 4.700.21.11102, CoreFX 4.700.21.11602), X64 RyuJIT

Method ClockSize Iterations Mean Error StdDev Median Gen 0 Gen 1 Gen 2 Allocated
VectorClock_comparisons_should_compare_same 100 1000 41.532 ms 0.4815 ms 0.4504 ms 41.502 ms 230.7692 - - 933.2 KB
VectorClock_comparisons_should_compare_Before_last 100 1000 40.287 ms 0.2606 ms 0.2310 ms 40.292 ms 230.7692 - - 933.2 KB
VectorClock_comparisons_should_compare_After_last 100 1000 40.362 ms 0.1729 ms 0.1350 ms 40.370 ms 230.7692 - - 933.2 KB
VectorClock_comparisons_should_compare_Concurrent_last 100 1000 40.147 ms 0.2403 ms 0.1876 ms 40.109 ms 230.7692 - - 933.2 KB
VectorClock_comparisons_should_compare_Before_middle 100 1000 40.653 ms 0.2704 ms 0.2656 ms 40.606 ms 230.7692 - - 933.2 KB
VectorClock_comparisons_should_compare_After_middle 100 1000 40.927 ms 0.0756 ms 0.0631 ms 40.927 ms 250.0000 - - 933.2 KB
VectorClock_comparisons_should_compare_Concurrent_middle 100 1000 22.457 ms 0.4487 ms 0.7498 ms 22.289 ms 281.2500 - - 933.2 KB
VectorClock_comparisons_should_compare_notEquals_Before_Middle 100 1000 22.683 ms 0.4435 ms 0.4745 ms 22.691 ms 281.2500 - - 901.95 KB
VectorClock_comparisons_should_compare_notEquals_After_Middle 100 1000 2.232 ms 0.0515 ms 0.1486 ms 2.185 ms 292.9688 - - 901.95 KB
VectorClock_comparisons_should_compare_notEquals_Concurrent_Middle 100 1000 2.242 ms 0.0447 ms 0.1260 ms 2.208 ms 292.9688 - - 901.95 KB

@Aaronontheweb Aaronontheweb marked this pull request as ready for review April 19, 2021 19:43
@Aaronontheweb
Copy link
Member Author

Provided that all of the equality operations are functionally equivalent, I think that's great progress and we should merge it. Big improvement.

@Aaronontheweb Aaronontheweb changed the title [WIP] Performance optimize VectorClock Performance optimize VectorClock Apr 19, 2021
@Aaronontheweb Aaronontheweb merged commit 1f81842 into akkadotnet:dev Apr 19, 2021
@Aaronontheweb Aaronontheweb deleted the cluster/vectorclock-optimization branch April 19, 2021 21:04
This was referenced Apr 28, 2021
Aaronontheweb added a commit that referenced this pull request Apr 28, 2021
* Added v1.4.19 placeholder

* close #4860 - use local deploy for TcpManager child actors. (#4862)

* close #4860 - use local deploy for TcpManager child actors.

* Use local deploy for TcpIncomingConnection.

* Use local deploy for Udp actors.

Co-authored-by: Erik Folstad <erikmafo@gmail.com>
Co-authored-by: Aaron Stannard <aaron@petabridge.com>

* Merge pull request #4875 from akkadotnet/dependabot/nuget/Hyperion-0.9.17

Bump Hyperion from 0.9.16 to 0.9.17

* Bump Newtonsoft.Json from 12.0.3 to 13.0.1 (#4866)

Bumps [Newtonsoft.Json](https://github.com/JamesNK/Newtonsoft.Json) from 12.0.3 to 13.0.1.
- [Release notes](https://github.com/JamesNK/Newtonsoft.Json/releases)
- [Commits](JamesNK/Newtonsoft.Json@12.0.3...13.0.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>

* Fix ClusterMetricsExtensionSpec racy spec

* Clean up Akka.Stream file stream (#4874)

* Make sure that FileSubscriber shuts down cleanly when it dies

* Make sure that file all sink spec release the file handle if it fails

* Supress ActorSelectionMessage with DeadLetterSuppression (migrated from akka/akka#28341) (#4889)

* for example the Cluster InitJoin message is marked with DeadLetterSuppression
  but was anyway logged because sent with actorSelection
* for other WrappedMessage than ActorSelectionMessage we shouldn't unwrap and publish
  the inner in SuppressedDeadLetter because that might loose some information
* therefore those are silenced in the DeadLetterListener instead

Better deadLetter logging of wrapped messages (migrated from akka/akka#28253)

Logging of UnhandledMessage (migrated from akka/akka#28414)
* make use of the existing logging of dead letter
  also for UnhandledMessage

Add Dropped to Akka.Actor (migrated partially from akka/akka#27160)
Log Dropped from DeadLetterListener

* add CultureInfo for Turkish OS (#4880)

* add CultureInfo for Turkish OS

added English CultureInfo to fix ToUpper function causes error on Turkish OS. "warning"->"WARNİNG"

* fix LogLevel TR char error

Co-authored-by: Aaron Stannard <aaron@petabridge.com>

* Harden FileSink unit tests by using AwaitAssert to wait for file operations to complete (#4891)

* Harden FileSink unit tests by using AwaitAssert to wait for file operations to complete

* Use AwaitResult to improve readability

Co-authored-by: Aaron Stannard <aaron@petabridge.com>

* Handle CoordinatedShutdown exiting-completed when not joined (#4893)

* assertion failed: Nodes not part of cluster have marked the Gossip as seen
* trying to mark the Gossip as seen before it has joined, which may happen
  if CoordinatedShutdown is running before the node has joined

migrated from akka/akka#26835

* Persistence fixes (#4892)

* snapshot RecoveryTick ignored, part of akka/akka#20753

* lastSequenceNr should reflect the snapshot sequence and not start with 0 when journal is empty. Migrated from akka/akka#27496

* Enforce valid seqnr for deletes, migrated from akka/akka#25488

* api approval

* Added DoNotInherit annotation (#4896)

* Bump Microsoft.NET.Test.Sdk from 16.9.1 to 16.9.4 (#4894)

* Add Setup class for NewtonSoftJsonSerializer (#4890)

* Add Setup class for NewtonSoftJsonSerializer

* Use Setup as a settings modifier instead of a settings factory

* Update spec

* Update API Approval list

* Unit test can inject null ActorSystem into the serializer causing the Setup system to throw a NRE

* Add documentation

* fixed up copyright headers (#4898)

* Bump Google.Protobuf from 3.15.6 to 3.15.7 (#4900)

Bumps [Google.Protobuf](https://github.com/protocolbuffers/protobuf) from 3.15.6 to 3.15.7.
- [Release notes](https://github.com/protocolbuffers/protobuf/releases)
- [Changelog](https://github.com/protocolbuffers/protobuf/blob/master/generate_changelog.py)
- [Commits](protocolbuffers/protobuf@v3.15.6...v3.15.7)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>

* Added PhiAccrualFailureDetector warning logging for slow heartbeats (#4897)

Ported from akka/akka#17389 and akka/akka#24701

* replace reflection magic in MNTR with reading of `MultiNodeConfig` properties (#4902)

* close #4901 - replace reflection magic in MNTR with reading of MultiNodeConfig properties

* fixed outdated DiscoverySpec

* fixed SBR logging error that blew up StandardOutLogger (#4909)

This format error would cause the StandardOutLogger to throw a `FormatException` internally

* added timestamp to node failures in MNTR (#4911)

* cleaned up the SpecPass / SpecFail messages (#4912)

* reduce allocations inside PhiAccrualFailureDetector (#4913)

made `HeartbeatHistory` into a `readonly struct` and cleaned up some other old LINQ calls inside the data structure

* Bump Microsoft.Data.SQLite from 5.0.4 to 5.0.5 (#4914)

* [MNTR] Add include and exclude test filter feature (#4916)

* Add -Dmultinode.include and -Dmultinode.exclude filter feature

* Add documentation

* Fix typos and makes sentences more readable

* Make the sample command line wrap instead of running off the screen

* Change include and exclude filtering by method name instead (requested)

* cleaned up RemoteWatcher (#4917)

* Fixed System.ArgumentNullException in Interspase operation on empty stream finish. (#4918)

* Rewrite the AkkaDiFixture so that it does not need to start a HostBuilder (#4920)

* Fix case where PersistenceMessageSerializer.FromBinary got a null for its type parameter (#4923)

* Bump Google.Protobuf from 3.15.7 to 3.15.8 (#4927)

Bumps [Google.Protobuf](https://github.com/protocolbuffers/protobuf) from 3.15.7 to 3.15.8.
- [Release notes](https://github.com/protocolbuffers/protobuf/releases)
- [Changelog](https://github.com/protocolbuffers/protobuf/blob/master/generate_changelog.py)
- [Commits](protocolbuffers/protobuf@v3.15.7...v3.15.8)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>

* close #4096 - documented how to terminate remembered entities (#4928)

Updated the Akka.Cluster.Sharding documentation to explain how to terminate remembered-entities.

* Add CLI switches to show help and version number (#4925)

* cleaned up protobuf CLI and definitions (#4930)

* cleaned up protobuf CLI and definitions

- Remove all `optional` fields (not allowed in Protobuf3, as all fields are optional by default unless specifically defined as `required`)
- Removed `--experimental_allow_proto3_optional` call from `protoc` compiler as it's no longer supported / needed
- Doesn't have any impact on existing wire formats, especially for `ClusterMessages.proto` which is where I removed all of the `optional` commands

* fixed compilation error caused by change in generated `AppVersion` output

* Fix MNTK specs for DData: DurablePruningSpec (#4933)

* Powershell splits CLI arguments on "." before passing them into applications (#4924)

* porting Cluster heartbeat timings, hardened Akka.Cluster serialization (#4934)

* porting Cluster heartbeat timings, hardened Akka.Cluster serialization

port akka/akka#27281
port akka/akka#25183
port akka/akka#24625

* increased ClusterLogSpec join timespan

Increased the `TimeSpan` here to 10 seconds in order to prevent this spec from failing racily, since even an Akka.Cluster self-join can take more than the default 3 seconds due to some of the timings involved in node startup et al.

* Bump Hyperion from 0.9.17 to 0.10.0 (#4935)

Bumps [Hyperion](https://github.com/akkadotnet/Hyperion) from 0.9.17 to 0.10.0.
- [Release notes](https://github.com/akkadotnet/Hyperion/releases)
- [Changelog](https://github.com/akkadotnet/Hyperion/blob/dev/RELEASE_NOTES.md)
- [Commits](akkadotnet/Hyperion@0.9.17...0.10.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>

* Add spec for handling delegates in DI (#4922)

* Add spec for handling delegates in DI

* Make sure spec exits cleanly by terminating the actor system.

* Add spec where singleton delegate is called from another actor

* Fix racy test

Co-authored-by: Aaron Stannard <aaron@petabridge.com>

* Bump FsCheck from 2.15.1 to 2.15.2 (#4939)

* ClusterStressSpec and Cluster Failure Detector Cleanup (#4940)

* implementation of Akka.Cluster.Tests.MultiNode.StressSpec

* made MuteLog overrideable in Akka.Cluster.Testkit

* if Roles is empty, then don't run the thunk on any nodes

Changed this to make it consistent with the JVM

* made it possible to actually enable Cluster.AssertInvariants via environment variable

* added assert invariants to build script

cleaned up gossip class to assert more invariants

* ReSharper'd Reachability.cs

* cleaned up immutability and CAS issues inside DefaultFailureDetectorRegistry

added bugfix from akka/akka#23595

* Bump FsCheck.Xunit from 2.15.1 to 2.15.2 (#4938)

Bumps [FsCheck.Xunit](https://github.com/fsharp/FsCheck) from 2.15.1 to 2.15.2.
- [Release notes](https://github.com/fsharp/FsCheck/releases)
- [Changelog](https://github.com/fscheck/FsCheck/blob/master/FsCheck%20Release%20Notes.md)
- [Commits](fscheck/FsCheck@2.15.1...2.15.2)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>

* cleanup `AKKA_CLUSTER_ASSERT` environment variable (#4942)

Per some of the suggestions on #4940 PR review

* harden Akka.DependencyInjection.Tests (#4945)

Added some `AwaitAssert` calls to check for disposed dependencies - these calls can be racy due to background actor thread calling `Dipose` after foreground test thread checks the `Disposed` property.

* HeartbeatNodeRing performance (#4943)

* added benchmark for HeartbeatNodeRing performance

* switched to local function

No perf change

* approve Akka.Benchmarks friend assembly for Akka.Cluster

* remove HeartbeatNodeRing.NodeRing() allocation and make field immutable

* made it so Akka.Util.Internal.ArrayExtensions.From no longer allocates (much)

* added some descriptive comments on HeartbeatNodeRing.Receivers

* Replaced `Lazy<T>` with `Option<T>` and a similar lazy initialization check

 Improved throughput by ~10% on larger collections and further reduced memory allocation.

* changed return types to `IImmutableSet`

Did this in order to reduce allocations from constantly converting back and forth from `ImmutableSortedSet<T>` and `ImmutableHashSet<T>` - that way we can just use whatever the underlying collection type is.

* added ReachabilityBenchmarks

* modified PingPong / RemotePingPong benchmarks to display threadcount (#4947)

Using this to gauge the impact certain dispatcher changes have on the total number of active threads per-process

* Configure duration for applying `MemberStatus.WeaklyUp`  to joining nodes (#4946)

* Configure duration for applying `MemberStatus.WeaklyUp`  to joining nodes

port of akka/akka#29665

* fixed validation check for TimeSpan duration passed in via HOCON

* harden ClusterLogSpecs

* restored Akka.Cluster model-based FsCheck specs (#4949)

* added `VectorClock` benchmark (#4950)

* added VectorClock benchmark

* fixed broken benchmark comparisons

* Performance optimize `VectorClock` (#4952)

* Performance optimize `VectorClock`

* don't cache MD5, but dispose of it

* guarantee disposal of iterators during VectorClock.Compare

* switch to local function for `VectorClock.CompareNext`

* fixed a comparison bug in how versions where compared

* minor cleanup

* replace `KeyValuePair<TKey,TValue>` with `ValueTuple<TKey,TValue>`

Reduced allocations by 90%, decreased execution time from 100ms to ~40ms

* harden RestartFirstSeedNodeSpec (#4954)

* harden RestartFirstSeedNodeSpec

* validate that we have complete seed node list prior to test

* Turned `HeatbeatNodeRing` into `struct` (#4944)

* added benchmark for HeartbeatNodeRing performance

* switched to local function

No perf change

* approve Akka.Benchmarks friend assembly for Akka.Cluster

* remove HeartbeatNodeRing.NodeRing() allocation and make field immutable

* made it so Akka.Util.Internal.ArrayExtensions.From no longer allocates (much)

* added some descriptive comments on HeartbeatNodeRing.Receivers

* Replaced `Lazy<T>` with `Option<T>` and a similar lazy initialization check

 Improved throughput by ~10% on larger collections and further reduced memory allocation.

* changed return types to `IImmutableSet`

Did this in order to reduce allocations from constantly converting back and forth from `ImmutableSortedSet<T>` and `ImmutableHashSet<T>` - that way we can just use whatever the underlying collection type is.

* converted `HeartbeatNodeRing` into a `struct`

improved performance some, but I don't want to lump it in with other changes just in case

* Add generalized crossplatform support for Hyperion serializer. (#4878)

* Add the groundwork for generalized crossplatform support.

* Update Hyperion to 0.10.0

* Convert adapter class to lambda object

* Add HyperionSerializerSetup setup class

* Add unit test spec

* Improve specs, add comments

* Add documentation

* Add copyright header.

* Change readonly fields to readonly properties.

* cleaned up `ReceiveActor` documentation (#4958)

* removed confusing and conflicting examples in the `ReceiveActor` documentation
* Embedded reference to "how actors restart" YouTube video in supervision docs

* updated website footer to read 2021 (#4959)

* added indicator for `ClusterResultsAggregator` in `StressSpec` logs (#4960)

Did this to make it easier to search for output logs produced during each phase of the `StressSpec`

* Bump Hyperion from 0.10.0 to 0.10.1 (#4957)

* Bump Hyperion from 0.10.0 to 0.10.1

Bumps [Hyperion](https://github.com/akkadotnet/Hyperion) from 0.10.0 to 0.10.1.
- [Release notes](https://github.com/akkadotnet/Hyperion/releases)
- [Changelog](https://github.com/akkadotnet/Hyperion/blob/dev/RELEASE_NOTES.md)
- [Commits](akkadotnet/Hyperion@0.10.0...0.10.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

* Fix dependabot Hyperion issue (#4961)

* Update Akka.Remote.Tests.csproj to use common.props

* Update HyperionSerializer to reflect recent hyperion changes

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Co-authored-by: Gregorius Soedharmo <arkatufus@yahoo.com>

* Perf optimize `ActorSelection` (#4962)

* added memory metrics to `ActorSelection` benchmarks

* added ActorSelection benchmark

* ramped up the iteration counts

* validate that double wildcard can't be used outside of leaf node

* improve allocations on create

* minor cleanup

* create emptyRef only when needed via local function

* made `Iterator` into `struct`

* approved public API changes

* `Reachability` performance optimziation (#4955)

* reduced iteration count to speed up benchmarks

* optimize some System.Collections.Immutable invocations to allocate less

* cleanup dictionary construction

* fixed multiple enumeration bug in `Reachability`

* Fix `SpawnActor` benchmark (#4966)

* cleaned up SpawnActorBenchmarks

* cleaned up SpawnActor benchmarks

* fixed N-1 error inside `Mailbox` (#4964)

This error has no impact on extremely busy actors, but for actors who have to process small bursts of messages this can make the difference between getting everything done in one dispatch vs. doing it in two.

* Clean up bad outbound ACKs in Akka.Remote (#4963)

port of akka/akka#20093

Might be responsible for some quarantines in Akka.Cluster / Akka.Remote when nodes are restarting on identical addresses.

* UnfoldResourceSource closing twice on failure (#4969)

* Added test cases where close would be called twice

* Bugfix UnfoldResource closed resource twice on failure

* Add retry pattern with delay calculation support (#4895)

Co-authored-by: Aaron Stannard <aaron@petabridge.com>

* simplified the environment variable name for StressSpec (#4972)

* Refactored `Gossip` into `MembershipState` (#4968)

* refactor Gossip class into `MembershipState`

port of akka/akka#23291

* completed `MembershipState` port

* fixed some downed observers calls

* forgot to copy gossip upon `Welcome` from Leader

* forgot to copy `MembershipState` while calling `UpdateLatestGossip`

* refactored all DOWN-ing logic to live inside `Gossip` class

* added some additional methods onto `MembershipState`

* fixed ValidNodeForGossip bug

* fixed equality check for Reachability

 should be quality by reference, not by value

Co-authored-by: Gregorius Soedharmo <arkatufus@yahoo.com>

* Fix serialization verification problem with Akka.IO messages (#4974)

* Fix serialization verification problem with Akka.IO messages

* Wrap naked SocketAsyncEventArgs in a struct that inherits INoSerializationVerificationNeeded

* Make the wrapper struct readonly

* Expand exception message with their actor types

* Update API Approver list

* ORDictionary with POCO value missing items, add MultiNode spec (#4910)

* Update DData reference HOCON config to follow JVM

* Clean up ReplicatorSettings, add sensible default values.

* Add DurableData spec that uses ORDictionary with POCO values

* Add a special case for Replicator to suppress messages during load

* Slight change in public API, behaviour is identical.

* Change Replicator class to UntypedActor

* Code cleanup - Change fields to properties

* Update API Approver list

* clean up seed node process (#4975)

* fixed racy ActorModelSpec (#4976)

fixed `A_dispatcher_must_handle_queuing_from_multiple_threads` - we were using the wrong message type the entire time, and the previous instance caused `Thread.Sleep` to be called repeatedly.

* Update PluginSpec so that it can accept ActorSystem and ActorSystemSetup in its constructor (#4978)

* Removed inaccurate warning from Cluster Singleton docs (#4980)

Cluster singletons won't create duplicates in a cluster split scenario, and it's much safer to run them _with_ a split brain resolver on than without. This documentation was just out of date.

* Introduce `ChannelExecutor` (#4882)

* added `ChannelExecutor` dispatcher - uses `FixedConcurrencyTaskScheduler` internally - have `ActorSystem.Create` call `ThreadPool.SetMinThreads(0,0)` to improve performance across the board.

* fixed documentation errors

* Upgrade to GitHub-native Dependabot (#4984)

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>

* added v1.4.19 release notes (#4985)

* added v1.4.19 release notes

Co-authored-by: Erik Følstad <32196030+ef-computas@users.noreply.github.com>
Co-authored-by: Erik Folstad <erikmafo@gmail.com>
Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Co-authored-by: Igor <igor@fedchenko.pro>
Co-authored-by: Gregorius Soedharmo <arkatufus@yahoo.com>
Co-authored-by: zbynek001 <zbynek001@gmail.com>
Co-authored-by: Cagatay YILDIZOGLU <yildizoglu@gmail.com>
Co-authored-by: Ismael Hamed <1279846+ismaelhamed@users.noreply.github.com>
Co-authored-by: Anton V. Ilyin <iliyn.anton.v@gmail.com>
Co-authored-by: Arjen Smits <Deathraven163@gmail.com>
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.

1 participant