Skip to content

Conversation

@rbulter
Copy link
Contributor

@rbulter rbulter commented Aug 29, 2020

No description provided.

- Fix pre-allocated buffer handling
- Solve message corruption because of wrong locking in write function
- Add interceptors for tcp_admin
@codecov-io
Copy link

Codecov Report

❗ No coverage uploaded for pull request base (master@20f794b). Click here to learn what that means.
The diff coverage is 64.01%.

Impacted file tree graph

@@            Coverage Diff            @@
##             master     #279   +/-   ##
=========================================
  Coverage          ?   68.61%           
=========================================
  Files             ?      137           
  Lines             ?    27382           
  Branches          ?        0           
=========================================
  Hits              ?    18788           
  Misses            ?     8594           
  Partials          ?        0           
Impacted Files Coverage Δ
...les/pubsub/pubsub_admin_tcp/src/pubsub_tcp_admin.c 51.74% <20.00%> (ø)
...es/pubsub/pubsub_admin_tcp/src/pubsub_tcp_common.c 40.00% <40.00%> (ø)
bundles/pubsub/pubsub_utils/src/pubsub_utils_url.c 51.75% <54.54%> (ø)
...b/pubsub_admin_tcp/src/pubsub_tcp_topic_receiver.c 61.60% <58.33%> (ø)
...s/pubsub/pubsub_admin_tcp/src/pubsub_tcp_handler.c 75.13% <65.51%> (ø)
...sub/pubsub_admin_tcp/src/pubsub_tcp_topic_sender.c 67.06% <80.95%> (ø)
...undles/pubsub/pubsub_admin_tcp/src/psa_activator.c 100.00% <100.00%> (ø)
...sub_topology_manager/src/pubsub_topology_manager.c 57.60% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 20f794b...17c6f7c. Read the comment docs.

@codecov-commenter
Copy link

Codecov Report

Merging #279 into master will increase coverage by 0.22%.
The diff coverage is 64.01%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #279      +/-   ##
==========================================
+ Coverage   68.30%   68.53%   +0.22%     
==========================================
  Files         136      137       +1     
  Lines       27371    27443      +72     
==========================================
+ Hits        18696    18808     +112     
+ Misses       8675     8635      -40     
Impacted Files Coverage Δ
...les/pubsub/pubsub_admin_tcp/src/pubsub_tcp_admin.c 48.47% <20.00%> (-0.54%) ⬇️
...es/pubsub/pubsub_admin_tcp/src/pubsub_tcp_common.c 40.00% <40.00%> (ø)
bundles/pubsub/pubsub_utils/src/pubsub_utils_url.c 51.75% <54.54%> (ø)
...b/pubsub_admin_tcp/src/pubsub_tcp_topic_receiver.c 61.60% <58.33%> (-1.66%) ⬇️
...s/pubsub/pubsub_admin_tcp/src/pubsub_tcp_handler.c 72.51% <65.51%> (-2.74%) ⬇️
...sub/pubsub_admin_tcp/src/pubsub_tcp_topic_sender.c 67.06% <80.95%> (+2.71%) ⬆️
...undles/pubsub/pubsub_admin_tcp/src/psa_activator.c 100.00% <100.00%> (ø)
...sub_topology_manager/src/pubsub_topology_manager.c 57.48% <100.00%> (+4.68%) ⬆️
... and 10 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 20f794b...17c6f7c. Read the comment docs.

@codecov-io
Copy link

codecov-io commented Oct 6, 2020

Codecov Report

Merging #279 (9663481) into master (dd4dca1) will increase coverage by 0.09%.
The diff coverage is 63.65%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #279      +/-   ##
==========================================
+ Coverage   68.17%   68.26%   +0.09%     
==========================================
  Files         148      149       +1     
  Lines       30088    30171      +83     
==========================================
+ Hits        20511    20597      +86     
+ Misses       9577     9574       -3     
Impacted Files Coverage Δ
...es/pubsub/pubsub_admin_tcp/src/pubsub_tcp_common.c 0.00% <0.00%> (ø)
...les/pubsub/pubsub_admin_tcp/src/pubsub_tcp_admin.c 48.24% <20.00%> (-0.76%) ⬇️
...b/pubsub_admin_tcp/src/pubsub_tcp_topic_receiver.c 63.47% <50.70%> (+0.20%) ⬆️
bundles/pubsub/pubsub_utils/src/pubsub_utils_url.c 53.07% <54.54%> (ø)
...sub_topology_manager/src/pubsub_topology_manager.c 54.25% <60.00%> (+1.34%) ⬆️
...s/pubsub/pubsub_admin_tcp/src/pubsub_tcp_handler.c 75.42% <67.34%> (+0.18%) ⬆️
...sub/pubsub_admin_tcp/src/pubsub_tcp_topic_sender.c 68.93% <84.05%> (+2.77%) ⬆️
...undles/pubsub/pubsub_admin_tcp/src/psa_activator.c 100.00% <100.00%> (ø)
...b_protocol_wire_v1/src/pubsub_wire_protocol_impl.c 96.38% <100.00%> (+9.80%) ⬆️
... and 12 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update dd4dca1...9663481. Read the comment docs.

@rbulter rbulter requested a review from pnoltes October 16, 2020 12:14
Copy link
Contributor Author

@rbulter rbulter left a comment

Choose a reason for hiding this comment

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

I have updated the review comments

@Oipo
Copy link
Contributor

Oipo commented Dec 14, 2020

@rbulter you have missed some review comments. Please check them all.

@rbulter rbulter requested a review from Oipo December 14, 2020 14:32
Copy link
Contributor Author

@rbulter rbulter left a comment

Choose a reason for hiding this comment

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

Done

Copy link
Contributor

@Oipo Oipo left a comment

Choose a reason for hiding this comment

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

Still plenty of changes requested left, some from previous review. Cannot approve this PR until those have been resolved.

@rbulter rbulter requested review from Oipo and pnoltes December 16, 2020 15:41
@pnoltes
Copy link
Contributor

pnoltes commented Dec 17, 2020

Our IVV test where failing for the updated PubSub TCP Admin, apparently this update does not work with wire protocol v1.

@rbulter Is it correct that the updated PubSub TCP Admin does not work with wire protocol v1?
If not, please add a pubsub tcp admin test with wire protocol v1.
If correct, please update the tcp admin match , so that only wire protocol v2 is searched and supported.

Maybe add an pubsubEndpoint_matchPublisherWithRequestedProtocolAndSerializer function which is used by the 'normal' pubsubEndpoint_matchPublisher and can be called directly by the tcp admin match with a filled in requestedProtcol="envelope-v2" argument. And the same for pubsubEnd_matchSubscriber.
This should enforce the tcp admin to use the correct wire protocol or fail in the match.

Copy link
Contributor

@pnoltes pnoltes left a comment

Choose a reason for hiding this comment

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

see comment about wire protocol

@rbulter
Copy link
Contributor Author

rbulter commented Dec 17, 2020

The pubsub admin should work with wire protocol v1, in the past it was working. I will add a unit test

@rbulter
Copy link
Contributor Author

rbulter commented Dec 17, 2020

I added a test for wire_v1 and found the error in wire_v1. During the refactor of wire_v1 a flag was removed, which is needed by tcp_admin for message segmentation

@rbulter rbulter requested a review from pnoltes December 17, 2020 19:27
Copy link
Contributor

@Oipo Oipo left a comment

Choose a reason for hiding this comment

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

IVV tests are green with the latest changes. The only thing left now is to merge develop into this branch, as that will solve the conflicts and fix the OSX build.

Thank you for the effort put into fixing review comments.

bool pubsub_tcpTopicSender_isPassive(pubsub_tcp_topic_sender_t *sender);
long pubsub_tcpTopicSender_serializerSvcId(pubsub_tcp_topic_sender_t *sender);
long pubsub_tcpTopicSender_protocolSvcId(pubsub_tcp_topic_sender_t *sender);
/* Note this functions are deprecated and not used */
Copy link
Contributor

Choose a reason for hiding this comment

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

👍

if ( handlingThreadSleepTime >= 0 ) {
manager->handlingThreadSleepTime = handlingThreadSleepTime * 1000L;
}
manager->handlingThreadSleepTime = celix_bundleContext_getPropertyAsLong(context, PUBSUB_TOPOLOGY_MANAGER_HANDLING_THREAD_SLEEPTIME_MS_KEY, manager->handlingThreadSleepTime);
Copy link
Contributor

Choose a reason for hiding this comment

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

👍

@pnoltes pnoltes merged commit 0d994d8 into master Dec 20, 2020
@pnoltes pnoltes deleted the feature/tcp_admin_msg_segmentation branch December 20, 2020 13:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

pubsub_tcpTopicReceiver_destroy dereferences freed/NULL memory

5 participants