You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@geode.apache.org by "aaronlindsey (GitHub)" <gi...@apache.org> on 2019/09/10 23:06:58 UTC

[GitHub] [geode] aaronlindsey opened pull request #4038: GEODE-7184: Add function executions timer

Add TimingFunction class which decorates a Function and adds execution timers.

Update InternalFunctionExecutionServiceImpl to decorate registered Functions in TimingFunctions. Internal functions (i.e. those that implement InternalEntity) are not decorated.

Co-authored-by: Aaron Lindsey <al...@pivotal.io>
Co-authored-by: Kirk Lund <kl...@apache.org>
Co-authored-by: Dale Emery <de...@pivotal.io>

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:
- [x] Is there a JIRA ticket associated with this PR? Is it referenced in the commit message?

- [x] Has your PR been rebased against the latest commit within the target branch (typically `develop`)?

- [x] Is your initial contribution a single, squashed commit?

- [x] Does `gradlew build` run cleanly?

- [x] Have you written or updated unit tests to verify your changes?

### 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.


[ Full content available at: https://github.com/apache/geode/pull/4038 ]
This message was relayed via gitbox.apache.org for notifications@geode.apache.org

[GitHub] [geode] aaronlindsey commented on issue #4038: GEODE-7184: Add function executions timer

Posted by "aaronlindsey (GitHub)" <gi...@apache.org>.
Closing to re-work the solution to address the issues above.

[ Full content available at: https://github.com/apache/geode/pull/4038 ]
This message was relayed via gitbox.apache.org for notifications@geode.apache.org

[GitHub] [geode] aaronlindsey closed pull request #4038: GEODE-7184: Add function executions timer

Posted by "aaronlindsey (GitHub)" <gi...@apache.org>.
[ pull request closed by aaronlindsey ]

[ Full content available at: https://github.com/apache/geode/pull/4038 ]
This message was relayed via gitbox.apache.org for notifications@geode.apache.org

[GitHub] [geode] aaronlindsey commented on issue #4038: GEODE-7184: Add function executions timer

Posted by "aaronlindsey (GitHub)" <gi...@apache.org>.
The following concerns/issues still need to be addressed for this PR:
1. With our changes, `FunctionService.getFunction(String)` will now return a `TimingFunction` instead of the function that that was passed to `FunctionService.registerFunction(Function)`. This could be a problem for users if they are doing an explicit cast after getting the function, like `(MyFunction) FunctionService.getFunction("MyFunction")`. Is this a breaking change? I have a thread going on the dev list about this topic.
2. The PR is failing `AnalyzeSerializablesJUnitTest.testSerializables` because we added a new Serializable class, `TimingFunction`. We need to determine if this class can actually be serialized. If it cannot, we just need to add it to `excludedClasses.txt` and we're done. If it can be serialized, we need to consider the implications. One possible way to avoid backwards compatibility issues would be to override the serialization behavior to replace the serialized form of `TimingFunction` with that of its inner function. After considering the implications, adding the class to `sanctioned-geode-core-serializables.txt` will fix the failing test.
3. Many D-unit tests are failing due to `ClassCastException` and `AssertionError` being thrown because we are now returning `TimingFunction` instead of the function that was passed to `FunctionService.registerFunction(Function)`. We verified that these exceptions are all thrown from test code and not product code. We need to update the test code to expect an instance of `TimingFunction` and know how to get the inner function from the `TimingFunction`.

[ Full content available at: https://github.com/apache/geode/pull/4038 ]
This message was relayed via gitbox.apache.org for notifications@geode.apache.org