Skip to content

Refactor shared storage. #98

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

Merged
merged 8 commits into from
Nov 17, 2020
Merged

Conversation

mathetake
Copy link
Contributor

@mathetake mathetake commented Nov 16, 2020

refactor the shared storage code:

  • separate out SharedQueue functionalities from ShareData class since they are independent of each other. It looks like they do not need to even share mutex.
  • write unit tests on each class

In a sequel PR, I would tackle the leakage issue

Signed-off-by: mathetake <takeshi@tetrate.io>
Signed-off-by: mathetake <takeshi@tetrate.io>
@mathetake mathetake changed the title Shared data leak Resolve shared storage memory leak. Nov 16, 2020
Signed-off-by: mathetake <takeshi@tetrate.io>
Copy link
Member

@PiotrSikora PiotrSikora left a comment

Choose a reason for hiding this comment

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

Could you avoid mixing big refactoring / moving code with bug fixes? While I don't mind the refactoring, it makes it impossible to review the fix.

@mathetake
Copy link
Contributor Author

right. Thanks. I will narrow down this PR scope only to refactoring and adding tests

@mathetake mathetake changed the title Resolve shared storage memory leak. Refactor shared storage. Nov 17, 2020
Signed-off-by: mathetake <takeshi@tetrate.io>
@mathetake mathetake marked this pull request as ready for review November 17, 2020 02:41
@mathetake
Copy link
Contributor Author

@PiotrSikora updated the PR description and title, and made ready for review! PTAL

@mathetake mathetake requested a review from lizan November 17, 2020 03:37
@PiotrSikora
Copy link
Member

Thanks! Since, as you noted, they are completely independent, should we split them into src/shared_data.* and src/shared_queue.*? or do you prefer to leave them together?

@mathetake
Copy link
Contributor Author

should we split them into src/shared_data.* and src/shared_queue.*?

I will split them! Thanks for the comment

Signed-off-by: mathetake <takeshi@tetrate.io>
Signed-off-by: mathetake <takeshi@tetrate.io>
Signed-off-by: mathetake <takeshi@tetrate.io>
Signed-off-by: mathetake <takeshi@tetrate.io>
@PiotrSikora
Copy link
Member

This is just split + tests, right? No code changes?

@mathetake
Copy link
Contributor Author

YES, no code changes

@PiotrSikora PiotrSikora merged commit 44516a7 into proxy-wasm:master Nov 17, 2020
@PiotrSikora
Copy link
Member

Thanks!

@mathetake mathetake deleted the shared-data-leak branch November 17, 2020 08:41
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