Skip to content

Conversation

@JosiahWI
Copy link
Contributor

@JosiahWI JosiahWI commented Jun 18, 2024

This refactors Stripe::agg_copy with 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.

@JosiahWI JosiahWI added this to the 10.1.0 milestone Jun 18, 2024
@JosiahWI JosiahWI self-assigned this Jun 18, 2024
@JosiahWI JosiahWI force-pushed the refactor/agg-copy branch 2 times, most recently from 694a78c to d954467 Compare June 18, 2024 13:05
@bryancall bryancall requested review from masaori335 and vmamidi June 24, 2024 22:22
@JosiahWI JosiahWI marked this pull request as draft July 3, 2024 15:03
@JosiahWI
Copy link
Contributor Author

JosiahWI commented Jul 3, 2024

Waiting to rebase on #11508, which is higher priority, and #11509, which is easier to review.

@JosiahWI JosiahWI force-pushed the refactor/agg-copy branch from d954467 to ebaf3c0 Compare July 3, 2024 19:23
@JosiahWI
Copy link
Contributor Author

JosiahWI commented Jul 5, 2024

I made a rebase mistake; one of the metrics isn’t initialized. The error message for this could be improved.

@JosiahWI JosiahWI force-pushed the refactor/agg-copy branch from 931f45c to 9268e80 Compare July 5, 2024 16:37
@JosiahWI
Copy link
Contributor Author

JosiahWI commented Jul 5, 2024

I have finished rebasing.

@JosiahWI JosiahWI marked this pull request as ready for review July 5, 2024 16:37
masaori335
masaori335 previously approved these changes Jul 11, 2024
Copy link
Contributor

@masaori335 masaori335 left a 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.
Copy link
Contributor

@masaori335 masaori335 left a comment

Choose a reason for hiding this comment

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

Looks good!

@JosiahWI JosiahWI merged commit 6e08439 into apache:master Jul 12, 2024
@JosiahWI JosiahWI deleted the refactor/agg-copy branch July 12, 2024 10:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants