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

GEODE-5018: Fixing PIMPL pattern for Cache #278

Merged
merged 8 commits into from Apr 17, 2018

Conversation

mcmellawatt
Copy link
Contributor

No description provided.

Copy link
Contributor

@jake-at-work jake-at-work left a comment

Choose a reason for hiding this comment

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

Lots of formatting changes that seem unrelated. Did you blanket reformat the source?

@@ -76,7 +78,8 @@ class APACHE_GEODE_EXPORT Cache : public GeodeCache {
* @param regionShortcut
* To create the region specific type, @see RegionShortcut
*/
virtual RegionFactory createRegionFactory(RegionShortcut regionShortcut);
Copy link
Contributor

Choose a reason for hiding this comment

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

Region shortcut is an enum type. The size of the ref is actually more expensive than the enum value.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The tradeoff is we can't forward declare RegionShortcut if we pass by value since it needs access to the copy constructor. Is that preferable? If so I'll change it back to by-value and add an include for RegionShortcut.

Copy link
Contributor

Choose a reason for hiding this comment

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

That’s fine, it’s a small enum. Though I would expect a forward to work. See docs for enum class.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

You are right - forward declaration does work. CLion was giving me a false error, but it compiles fine. I'll watch out for that sort of thing in the future.

@@ -378,8 +395,9 @@ BEGIN_TEST(TEST_EXPIRATION)
//////////////
RegionAttributes attrs_18;
// ettl = 0, eit = 0, rttl = 0, reit = 0
attrs_18 = setRegionAttributesTimeouts(std::chrono::seconds(6), std::chrono::seconds(3),
Copy link
Contributor

Choose a reason for hiding this comment

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

Seems like a lot of formatting changes. Are you using clang-format?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes I ran all the source I touched through clang-format, but only if I made other changes to the file related to GEODE-5018.

Copy link
Contributor

Choose a reason for hiding this comment

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

What version of clang-format?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

clang-format version 7.0.0 (tags/google/stable/2018-01-11). This is the latest version available via brew

@mcmellawatt mcmellawatt reopened this Apr 17, 2018
@jake-at-work jake-at-work merged commit fc41344 into apache:develop Apr 17, 2018
@mcmellawatt mcmellawatt deleted the feature/GEODE-5018 branch May 23, 2018 22:15
jake-at-work pushed a commit to jake-at-work/geode-native that referenced this pull request Oct 6, 2018
* Moving type registry out and using forward decl
* Using initializer list in Cache constructor
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants