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

loggerd: extract write_encode_data and eliminate recursion from handle_encoder_msg #33453

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

deanlee
Copy link
Contributor

@deanlee deanlee commented Sep 4, 2024

Changes:

  1. Refactored handle_encoder_msg: Moved the encoding packet writing logic to a new function, write_encode_data, improving code clarity and separation of concerns while preserving the existing writing behavior.
  2. Eliminated Recursive Calls: Replaced recursive calls within handle_encoder_msg with direct calls to write_encode_data for writing queued packets in the new segment. This change prevents potential crashes by handling queued packets safely, even if they are out of sync with the encoderd.
  3. Improved Memory Management: Replaced raw pointers with std::unique_ptr for managing Message objects, improving memory safety.
  4. Removed Redundant Parameter: Removed the service.name parameter from handle_encoder_msg, as it duplicates the re.publish_name value already available through the re parameter.

Resolves #28857

Copy link
Contributor

This PR has had no activity for 9 days. It will be automatically closed in 2 days if there is no activity.

@github-actions github-actions bot added the stale label Sep 14, 2024
Copy link
Contributor

This PR has been automatically closed due to inactivity. Feel free to re-open once activity resumes.

Copy link
Contributor

This PR has had no activity for 9 days. It will be automatically closed in 2 days if there is no activity.

@github-actions github-actions bot added the stale label Sep 30, 2024
Copy link
Contributor

github-actions bot commented Oct 3, 2024

This PR has been automatically closed due to inactivity. Feel free to re-open once activity resumes.

@github-actions github-actions bot closed this Oct 3, 2024
@adeebshihadeh adeebshihadeh reopened this Oct 3, 2024
@github-actions github-actions bot removed the stale label Oct 4, 2024
Copy link
Contributor

This PR has had no activity for 9 days. It will be automatically closed in 2 days if there is no activity.

@adeebshihadeh
Copy link
Contributor

Can we break this up at all?

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.

memory leak when loggerd/encoderd get out of sync
2 participants