You are viewing a plain text version of this content. The canonical link for it is here.
Posted to devnull@infra.apache.org by "pivotal-eshu (GitHub)" <gi...@apache.org> on 2018/08/27 21:40:01 UTC
[GitHub] [geode] pivotal-eshu opened pull request #2388:
Feature/geode 5624 Use a single thread to ensure beforeCompletion and
afterCompletion are executed by the same thread.
[ Full content available at: https://github.com/apache/geode/pull/2388 ]
This message was relayed via gitbox.apache.org for devnull@infra.apache.org
[GitHub] [geode] dschneider-pivotal commented on pull request #2388:
Feature/geode 5624 Use a single thread to ensure beforeCompletion and
afterCompletion are executed by the same thread.
Posted by "dschneider-pivotal (GitHub)" <gi...@apache.org>.
I was wrong about this. We have a mocked beforeCompletion and afterCompletion so calling beforeCompletion.execute does not wait for doOp to finish
[ Full content available at: https://github.com/apache/geode/pull/2388 ]
This message was relayed via gitbox.apache.org for devnull@infra.apache.org
[GitHub] [geode] dschneider-pivotal commented on pull request #2388:
Feature/geode 5624 Use a single thread to ensure beforeCompletion and
afterCompletion are executed by the same thread.
Posted by "dschneider-pivotal (GitHub)" <gi...@apache.org>.
verify that execute was called first. This happens synchronously so it should have already happened.
executeBeforeCompletion does not return until beforeCompletion.doOp is called (and completed). So remove the await on beforeCompletion.doOp. Also add verification of beforeCompletion.isFinished() is true.
The 4th line of verification should be that we did afterCompletion.doOp and you need an await on that line
[ Full content available at: https://github.com/apache/geode/pull/2388 ]
This message was relayed via gitbox.apache.org for devnull@infra.apache.org
[GitHub] [geode] dschneider-pivotal commented on pull request #2388:
Feature/geode 5624 Use a single thread to ensure beforeCompletion and
afterCompletion are executed by the same thread.
Posted by "dschneider-pivotal (GitHub)" <gi...@apache.org>.
this can be simplified to "() -> !finished"
[ Full content available at: https://github.com/apache/geode/pull/2388 ]
This message was relayed via gitbox.apache.org for devnull@infra.apache.org
[GitHub] [geode] dschneider-pivotal commented on pull request #2388:
Feature/geode 5624 Use a single thread to ensure beforeCompletion and
afterCompletion are executed by the same thread.
Posted by "dschneider-pivotal (GitHub)" <gi...@apache.org>.
this can be simplified to "() -> status == -1 && !cancelled"
No need for the "return" or the "{();}"
[ Full content available at: https://github.com/apache/geode/pull/2388 ]
This message was relayed via gitbox.apache.org for devnull@infra.apache.org
[GitHub] [geode] dschneider-pivotal commented on pull request #2388:
Feature/geode 5624 Use a single thread to ensure beforeCompletion and
afterCompletion are executed by the same thread.
Posted by "dschneider-pivotal (GitHub)" <gi...@apache.org>.
change this to "while (!condition.getAsBoolean())" so the impl match the method name "waitForCondition".
So you will need to change the callers to flip the logic of the expressions they pass in.
change: "!finished" to "finished"
change: "status == -1 && !cancelled" to "status != -1 || cancelled".
[ Full content available at: https://github.com/apache/geode/pull/2388 ]
This message was relayed via gitbox.apache.org for devnull@infra.apache.org
[GitHub] [geode] pivotal-eshu closed pull request #2388:
Feature/geode 5624 Use a single thread to ensure beforeCompletion and
afterCompletion are executed by the same thread.
Posted by "pivotal-eshu (GitHub)" <gi...@apache.org>.
[ pull request closed by pivotal-eshu ]
[ Full content available at: https://github.com/apache/geode/pull/2388 ]
This message was relayed via gitbox.apache.org for devnull@infra.apache.org
[GitHub] [geode] dschneider-pivotal commented on pull request #2388:
Feature/geode 5624 Use a single thread to ensure beforeCompletion and
afterCompletion are executed by the same thread.
Posted by "dschneider-pivotal (GitHub)" <gi...@apache.org>.
"this" refers to the "InOrder" line.
[ Full content available at: https://github.com/apache/geode/pull/2388 ]
This message was relayed via gitbox.apache.org for devnull@infra.apache.org
[GitHub] [geode] dschneider-pivotal commented on pull request #2388:
Feature/geode 5624 Use a single thread to ensure beforeCompletion and
afterCompletion are executed by the same thread.
Posted by "dschneider-pivotal (GitHub)" <gi...@apache.org>.
Move this up to the first line of the method. It should be before we call "executeBeforeCompletion".
[ Full content available at: https://github.com/apache/geode/pull/2388 ]
This message was relayed via gitbox.apache.org for devnull@infra.apache.org