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

Fixes for Memory leak on Quit , Fix support for Stream commands, Fix Crash #28

Merged
merged 3 commits into from
Aug 18, 2024

Conversation

dinesh-murugiah
Copy link
Collaborator

@dinesh-murugiah dinesh-murugiah commented Aug 11, 2024

Commit Message:
Fixes for Memory leak on Quit , Fix support for Stream commands, Fix Crash
Additional Description:
This PR has fixes for the following

  1. Memory leak
    There was a memory leak due to proxy filter object not freed , as the downstream callbacks was not cleared . this happened in only when quit command is called . that too quit command without remote close
    A wrapper function was added to free up the downstream objects before closing down stream connections locally

  2. Stream command support
    Fixes for properly supporting all stream commands catergory is added. stream blocking and non blocking comands are handled seperately

  3. Possible fixes for Random

    The reason for random crash is identified as trying to access freed memeory
    this is based on the understanding of the last point in which the logs have stopped and result from running address sanitiser , anyhow recomendation would be to still recreate the problem and get a back trace
    fixes have been done to not access already freed memory

Risk Level:
Testing:
Basic sanity testing done
Docs Changes:
Release Notes:
Platform Specific Features:
[Optional Runtime guard:]
[Optional Fixes #Issue]
[Optional Fixes commit #PR or SHA]
[Optional Deprecated:]
[Optional API Considerations:]

@dinesh-murugiah dinesh-murugiah changed the title Memleak fix on quit and xread fix Fixes for Memory leak on Quit , Fix support for Stream commands, Fix Crash Aug 15, 2024
@@ -561,7 +592,8 @@ void mgmtNoKeyRequest::onallChildRespAgrregate(Common::Redis::RespValuePtr&& val
if (!pending_responses_.empty()) {
Common::Redis::RespValuePtr response = std::move(pending_responses_[response_index_]);
callbacks_.onResponse(std::move(response));
pending_responses_.clear();
//pending_responses_.clear();

Choose a reason for hiding this comment

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

since you're commenting out the code, can you add a comment explaining why

@dinesh-murugiah dinesh-murugiah merged commit 308f328 into v1.28.0-dbaas Aug 18, 2024
1 check passed
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.

2 participants