aws / aws/aws-cdi-sdk

User-Registered Callback Log functions are running in the main thread.

Open
#21 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
C
Stars
63
Forks
19
PR merge metrics
No merged PRs in 30d

Description

Please find changes I added in the test_minimal_receiver.c
[test_minimal_receiver.zip](https://github.com/aws/aws-cdi-sdk/files/5661762/test_minimal_receiver.zip)

- I added log callback functions: TestConsoleLogMessageCallback and TestConsoleLogMessageCallback2.

- The TestConsoleLogMessageCallback2 has delay for 3 seconds. I try to research issue if the log would take quite a long time(for example the log is provided to Java process using JNI).

I found that in this case (delay in the log callback) the Tx-Rx connection is pretty much blocked and most of the tests are failed.

Can it be improved in the CDI code to ensure that the log callback is called from a separate thread ? Use a queue/multithreading in order not to prevent transmission of the packages if the Log takes longer than expected.

Contributor guide

Open the contributing guide

Research direction

Start with the attached test_minimal_receiver.c and the TestConsoleLogMessageCallback and TestConsoleLogMessageCallback2 functions, then reproduce the three-second callback delay to observe its effect on Tx-Rx tests. Done means a slow user-registered log callback no longer blocks package transmission, with the relevant tests still passing.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
networking
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.