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

NetworkTarget - UdpNetworkSender changed to QueuedNetworkSender #4549

Merged
merged 2 commits into from
Sep 10, 2021

Conversation

snakefoot
Copy link
Contributor

@snakefoot snakefoot commented Sep 5, 2021

Now performs "ordered" message split, so UDP network-packets will be sent in the order they have been logged (even when split into chunks). It will have the side-effect that if an UDP-socket fails, then all pending messages in queue will be marked as failed.

For TCP-network-senders then it removes the memory-allocation of the message-chunking-delegate (TCP network senders does not need help with splitting large messages).

@snakefoot snakefoot added this to the 5.0 (new) milestone Sep 5, 2021
@snakefoot snakefoot force-pushed the networktarget_maxmessagesize branch 8 times, most recently from 9d706a6 to 99e520b Compare September 5, 2021 16:17
@snakefoot snakefoot force-pushed the networktarget_maxmessagesize branch 3 times, most recently from 4767ed1 to f62cafc Compare September 5, 2021 18:18
@snakefoot snakefoot closed this Sep 6, 2021
@snakefoot snakefoot reopened this Sep 6, 2021
@snakefoot snakefoot closed this Sep 6, 2021
@snakefoot snakefoot reopened this Sep 6, 2021
@304NotModified
Copy link
Member

Will try to review next week. Now on holiday. Feel free to remind me :)

@sonarcloud
Copy link

sonarcloud bot commented Sep 9, 2021

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

82.9% 82.9% Coverage
0.0% 0.0% Duplication

Copy link
Member

@304NotModified 304NotModified left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me!

@snakefoot snakefoot merged commit 67e597d into NLog:dev Sep 10, 2021
@snakefoot
Copy link
Contributor Author

Looks like the unit-test need more work:

[xUnit.net 00:01:45.27]     NLog.UnitTests.Targets.NetworkTargetTests.NetworkTargetUdpTest(splitMessage: True) [FAIL]
  Failed NLog.UnitTests.Targets.NetworkTargetTests.NetworkTargetUdpTest(splitMessage: True) [77 ms]
  Error Message:
   Message #99 not received.
Expected: True
Actual:   False
  Stack Trace:
    at NLog.UnitTests.Targets.NetworkTargetTests.NetworkTargetUdpTest (System.Boolean splitMessage) [0x0021f] in <de11e80b67cd4315bb1f1a86a536ccd7>:0 
  at (wrapper managed-to-native) System.Reflection.RuntimeMethodInfo.InternalInvoke(System.Reflection.RuntimeMethodInfo,object,object[],System.Exception&)
  at System.Reflection.RuntimeMethodInfo.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x0006a] in <533173d24dae460899d2b10975534bb0>:0 

https://ci.appveyor.com/project/nlog/nlog/builds/40725702/job/qgwfdds2hkvxgjtx

More logging maybe to reveal what happens, since package drop is allowed with UDP.

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.

None yet

2 participants