Github user jhuynh1 commented on a diff in the pull request:
https://github.com/apache/geode/pull/444#discussion_r110702026
--- Diff:
geode-cq/src/test/java/org/apache/geode/cache/query/cq/dunit/CqQueryDUnitTest.java
---
@@ -1577,7 +1577,13 @@ public void run2() throws CacheException {
Region subregion = getCache().getRegion("root/" + regionName);
DistributedTombstoneOperation gc = DistributedTombstoneOperation
.gc((DistributedRegion) subregion, new
EventID(getCache().getDistributedSystem()));
- gc.distribute();
+ long viewVersion = -1;
+ try {
+ viewVersion = gc.startOperation();
+ gc.distribute();
+ } finally {
+ gc.endOperation(viewVersion);
--- End diff --
Same as my other question earlier, if an error occurs during start
operation, viewVersion could potentially be -1 still. Does this handle that
behavior correctly? We do this try/finally pattern in a lot of places, as
Bruce stated, maybe we could combine into a common method (there are some cases
where this may not be possible)
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---