Skip to content

GEODE-7789: Cache DurableClienAttributes#4687

Merged
jujoramos merged 3 commits intoapache:developfrom
jujoramos:feature/GEODE-7789
Feb 13, 2020
Merged

GEODE-7789: Cache DurableClienAttributes#4687
jujoramos merged 3 commits intoapache:developfrom
jujoramos:feature/GEODE-7789

Conversation

@jujoramos
Copy link
Copy Markdown
Contributor

Keep the last known 'DurableClienAttributes' cached within the
'InternalDistributedMember' class to avoid the overhead of creating a
new instance every time.

Thank you for submitting a contribution to Apache Geode.

In order to streamline the review of the contribution we ask you
to ensure the following steps have been taken:

For all changes:

  • Is there a JIRA ticket associated with this PR? Is it referenced in the commit message?

  • Has your PR been rebased against the latest commit within the target branch (typically develop)?

  • Is your initial contribution a single, squashed commit?

  • Does gradlew build run cleanly?

  • Have you written or updated unit tests to verify your changes?

  • If adding new dependencies to the code, are these dependencies licensed in a way that is compatible for inclusion under ASF 2.0?

Note:

Please ensure that once the PR is submitted, check Concourse for build issues and
submit an update to your PR as soon as possible. If you need help, please send an
email to dev@geode.apache.org.

Keep the last known 'DurableClienAttributes' cached within the
'InternalDistributedMember' class to avoid the overhead of creating a
new instance every time.
@jujoramos jujoramos marked this pull request as ready for review February 12, 2020 09:43
@jujoramos jujoramos changed the title [WIP] GEODE-7789: Cache DurableClienAttributes GEODE-7789: Cache DurableClienAttributes Feb 12, 2020
Copy link
Copy Markdown
Contributor

@bschuchardt bschuchardt left a comment

Choose a reason for hiding this comment

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

I think that one of the main points of this PR is to ensure that getDurableClientAttributes() returns the same object if the attributes haven't changed. You should add some assertions around that.
x = id.getDurableClientAttributes();
assertThat(x).isSameAs(id.getDurableClientAttributes())

@jujoramos
Copy link
Copy Markdown
Contributor Author

@bschuchardt : I verified this manually with YourKit instead of adding the test, thanks for pointing this out!. Changes are done.

Copy link
Copy Markdown
Contributor

@bschuchardt bschuchardt left a comment

Choose a reason for hiding this comment

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

good work Juan

@jujoramos jujoramos merged commit 71e156a into apache:develop Feb 13, 2020
@jujoramos jujoramos deleted the feature/GEODE-7789 branch February 13, 2020 10:00
echobravopapa pushed a commit that referenced this pull request Feb 13, 2020
Keep the last known 'DurableClienAttributes' cached within the
'InternalDistributedMember' class to avoid the overhead of creating a
new instance every time.

(cherry picked from commit 71e156a)
mhansonp pushed a commit to mhansonp/geode that referenced this pull request Mar 12, 2020
Keep the last known 'DurableClienAttributes' cached within the
'InternalDistributedMember' class to avoid the overhead of creating a
new instance every time.
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