-
Notifications
You must be signed in to change notification settings - Fork 848
Clean up agg_copy #11456
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
Clean up agg_copy #11456
Conversation
694a78c to
d954467
Compare
d954467 to
ebaf3c0
Compare
|
I made a rebase mistake; one of the metrics isn’t initialized. The error message for this could be improved. |
931f45c to
9268e80
Compare
|
I have finished rebasing. |
masaori335
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like this is just moving code and no behavior changes.
* Elide temporary mutex variable for `ink_assert` It's obvious from the context of the method calls that the variable holds the raw stripe mutex. The temporary variable clarifies nothing. * Move the new `Doc` methods to a source file This adds the CacheDoc.cc file. If some of the methods such as `pin` and `unpin` cause a performance problem by not being inlined, we can easily move them back to the header. For now, keeping the implementation in a source file helps speed up compile times and limits dependency scope.
masaori335
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good!
This refactors
Stripe::agg_copywith the goal of making it a bit more understandable. I've tried to improve some variable names and extract a few functions where it makes sense. There should be no behavioral change and the specific changes made should be covered pretty well by the existing unit tests. I think the only logic changes are in 4f133d9, 50c1393 (the order of two assignments was swapped), and d954467.