You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@geode.apache.org by GitBox <gi...@apache.org> on 2021/08/10 22:44:54 UTC

[GitHub] [geode] dkhopade opened a new pull request #6757: merged 2 classes. moved the tests from incorrectly spelled test class (JIRA: GEODE-1505

dkhopade opened a new pull request #6757:
URL: https://github.com/apache/geode/pull/6757


   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? **Ans: forgot to add the JIRA number in the commit message, however, the branch where changes are made with the JIRA number in it.**
   
   - [X] Has your PR been rebased against the latest commit within the target branch (typically `develop`)? **Ans: Yes**
   
   - [X] Is your initial contribution a single, squashed commit? **Ans: Yes**
   
   - [X] Does `gradlew build` run cleanly? **Ans: Yes**
   
   - [X] Have you written or updated unit tests to verify your changes? **Ans: Yes**
   
   - [X] If adding new dependencies to the code, are these dependencies licensed in a way that is compatible for inclusion under [ASF 2.0](http://www.apache.org/legal/resolved.html#category-a)? **Ans: No new dependencies introduced**
   
   ### 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.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@geode.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [geode] dkhopade commented on pull request #6757: GEODE-1505: merged 2 classes. moved the tests from incorrectly spelled test class

Posted by GitBox <gi...@apache.org>.
dkhopade commented on pull request #6757:
URL: https://github.com/apache/geode/pull/6757#issuecomment-901127311


   @DonalEvans, I have committed the changes that triggered the build actions, but this one CI "concourse-ci/distributed-test-openjdk8" is failing. Do you have any idea how to restart that or what could be wrong? 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@geode.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [geode] dkhopade commented on pull request #6757: GEODE-1505: merged 2 classes. moved the tests from incorrectly spelled test class

Posted by GitBox <gi...@apache.org>.
dkhopade commented on pull request #6757:
URL: https://github.com/apache/geode/pull/6757#issuecomment-900365974


   I agree @DonalEvans and thanks for your review comments. I am on it :).


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@geode.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [geode] onichols-pivotal merged pull request #6757: GEODE-1505: merged 2 classes. moved the tests from incorrectly spelled test class

Posted by GitBox <gi...@apache.org>.
onichols-pivotal merged pull request #6757:
URL: https://github.com/apache/geode/pull/6757


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@geode.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [geode] DonalEvans commented on a change in pull request #6757: GEODE-1505: merged 2 classes. moved the tests from incorrectly spelled test class

Posted by GitBox <gi...@apache.org>.
DonalEvans commented on a change in pull request #6757:
URL: https://github.com/apache/geode/pull/6757#discussion_r694396652



##########
File path: geode-core/src/integrationTest/java/org/apache/geode/cache/query/internal/index/IndexMaintenanceJUnitTest.java
##########
@@ -1057,6 +1071,394 @@ public void testBug43597() throws Exception {
     region.put("1", pf1);
   }
 
+  /**
+   * Starting of section - moved from wrongly spelled old class "IndexMaintainceJUnitTest".
+   * GEODE-1505
+   */
+
+  @Test
+  public void test000BUG32452()
+      throws IndexNameConflictException, IndexExistsException, RegionNotFoundException {
+    Index i1 = qs.createIndex("tIndex", IndexType.FUNCTIONAL, "vals.secId",
+        SEPARATOR + "portfolio pf, pf.positions.values vals");
+    Index i2 = qs.createIndex("dIndex", IndexType.FUNCTIONAL, "pf.getCW(pf.ID)",
+        SEPARATOR + "portfolio pf");
+    Index i3 = qs.createIndex("fIndex", IndexType.FUNCTIONAL, "sIter",
+        SEPARATOR + "portfolio pf, pf.collectionHolderMap[(pf.ID).toString()].arr sIter");
+    Index i4 = qs.createIndex("cIndex", IndexType.FUNCTIONAL,
+        "pf.collectionHolderMap[(pf.ID).toString()].arr[pf.ID]", SEPARATOR + "portfolio pf");
+    Index i5 = qs.createIndex("inIndex", IndexType.FUNCTIONAL, "kIter.secId",
+        SEPARATOR + "portfolio['0'].positions.values kIter");
+    Index i6 = qs.createIndex("sIndex", IndexType.FUNCTIONAL, "pos.secId",
+        SEPARATOR + "portfolio.values val, val.positions.values pos");
+    Index i7 = qs.createIndex("p1Index", IndexType.PRIMARY_KEY, "pkid", SEPARATOR + "portfolio pf");
+    Index i8 = qs.createIndex("p2Index", IndexType.PRIMARY_KEY, "pk", SEPARATOR + "portfolio pf");
+    if (!i1.getCanonicalizedFromClause()
+        .equals(SEPARATOR + "portfolio index_iter1, index_iter1.positions.values index_iter2")
+        || !i1.getCanonicalizedIndexedExpression().equals("index_iter2.secId")
+        || !i1.getFromClause().equals(SEPARATOR + "portfolio pf, pf.positions.values vals")
+        || !i1.getIndexedExpression().equals("vals.secId")) {
+      fail("Mismatch found among fromClauses or IndexedExpressions");
+    }
+    if (!i2.getCanonicalizedFromClause().equals(SEPARATOR + "portfolio index_iter1")
+        || !i2.getCanonicalizedIndexedExpression().equals("index_iter1.getCW(index_iter1.ID)")
+        || !i2.getFromClause().equals(SEPARATOR + "portfolio pf")
+        || !i2.getIndexedExpression().equals("pf.getCW(pf.ID)")) {
+      fail("Mismatch found among fromClauses or IndexedExpressions");
+    }
+    if (!i3.getCanonicalizedFromClause().equals(
+        SEPARATOR
+            + "portfolio index_iter1, index_iter1.collectionHolderMap[index_iter1.ID.toString()].arr index_iter3")
+        || !i3.getCanonicalizedIndexedExpression().equals("index_iter3")
+        || !i3.getFromClause()
+            .equals(
+                SEPARATOR + "portfolio pf, pf.collectionHolderMap[(pf.ID).toString()].arr sIter")
+        || !i3.getIndexedExpression().equals("sIter")) {
+      fail("Mismatch found among fromClauses or IndexedExpressions");
+    }
+    if (!i4.getCanonicalizedFromClause().equals(SEPARATOR + "portfolio index_iter1")
+        || !i4.getCanonicalizedIndexedExpression().equals(
+            "index_iter1.collectionHolderMap[index_iter1.ID.toString()].arr[index_iter1.ID]")
+        || !i4.getFromClause().equals(SEPARATOR + "portfolio pf") || !i4.getIndexedExpression()
+            .equals("pf.collectionHolderMap[(pf.ID).toString()].arr[pf.ID]")) {
+      fail("Mismatch found among fromClauses or IndexedExpressions");
+    }
+    if (!i5.getCanonicalizedFromClause()
+        .equals(SEPARATOR + "portfolio['0'].positions.values index_iter4")
+        || !i5.getCanonicalizedIndexedExpression().equals("index_iter4.secId")
+        || !i5.getFromClause().equals(SEPARATOR + "portfolio['0'].positions.values kIter")
+        || !i5.getIndexedExpression().equals("kIter.secId")) {
+      fail("Mismatch found among fromClauses or IndexedExpressions");
+    }
+    if (!i6.getCanonicalizedFromClause()
+        .equals(
+            SEPARATOR + "portfolio.values index_iter5, index_iter5.positions.values index_iter6")
+        || !i6.getCanonicalizedIndexedExpression().equals("index_iter6.secId")
+        || !i6.getFromClause().equals(SEPARATOR + "portfolio.values val, val.positions.values pos")
+        || !i6.getIndexedExpression().equals("pos.secId")) {
+      fail("Mismatch found among fromClauses or IndexedExpressions");
+    }
+    if (!i7.getCanonicalizedFromClause().equals(SEPARATOR + "portfolio index_iter1")
+        || !i7.getCanonicalizedIndexedExpression().equals("index_iter1.pkid")
+        || !i7.getFromClause().equals(SEPARATOR + "portfolio pf")
+        || !i7.getIndexedExpression().equals("pkid")) {
+      fail("Mismatch found among fromClauses or IndexedExpressions");
+    }
+    if (!i8.getCanonicalizedFromClause().equals(SEPARATOR + "portfolio index_iter1")
+        || !i8.getCanonicalizedIndexedExpression().equals("index_iter1.pk")
+        || !i8.getFromClause().equals(SEPARATOR + "portfolio pf")
+        || !i8.getIndexedExpression().equals("pk")) {
+      fail("Mismatch found among fromClauses or IndexedExpressions");
+    }
+    qs.removeIndex(i1);
+    qs.removeIndex(i2);
+    qs.removeIndex(i3);
+    qs.removeIndex(i4);
+    qs.removeIndex(i5);
+    qs.removeIndex(i6);
+    qs.removeIndex(i7);
+    qs.removeIndex(i8);
+    Index i9 =
+        qs.createIndex("p3Index", IndexType.PRIMARY_KEY, "getPk", SEPARATOR + "portfolio pf");
+    if (!i9.getCanonicalizedFromClause().equals(SEPARATOR + "portfolio index_iter1")
+        || !i9.getCanonicalizedIndexedExpression().equals("index_iter1.pk")
+        || !i9.getFromClause().equals(SEPARATOR + "portfolio pf")
+        || !i9.getIndexedExpression().equals("getPk")) {
+      fail("Mismatch found among fromClauses or IndexedExpressions");
+    }
+    qs.removeIndex(i9);
+  }
+
+  @Test
+  public void numberOfIndexValuesStatIsUpdatedWhenEntryAdded() throws Exception {
+    CacheUtils.log(((CompactRangeIndex) index).dump());
+    IndexStatistics stats = index.getStatistics();
+    assertEquals(4, stats.getNumberOfValues());
+    region.put("4", new Portfolio(4));
+    CacheUtils.log(((CompactRangeIndex) index).dump());
+    stats = index.getStatistics();
+    assertEquals(5, stats.getNumberOfValues());
+    SelectResults results = region.query("status = 'active'");
+    assertEquals(3, results.size());
+  }
+
+  /**
+   * Needed to fix this since the key "4" was not found and the size was then redueced to 3 after
+   * invalidating the key 3
+   */
+  @Test
+  public void testInvalidatingEntry() throws Exception {

Review comment:
       This test might be better named "numberOfIndexValuesStatIsUpdatedWhenEntryInvalidated"

##########
File path: geode-core/src/integrationTest/java/org/apache/geode/cache/query/internal/index/IndexMaintenanceJUnitTest.java
##########
@@ -1057,6 +1071,394 @@ public void testBug43597() throws Exception {
     region.put("1", pf1);
   }
 
+  /**
+   * Starting of section - moved from wrongly spelled old class "IndexMaintainceJUnitTest".
+   * GEODE-1505
+   */
+
+  @Test
+  public void test000BUG32452()
+      throws IndexNameConflictException, IndexExistsException, RegionNotFoundException {
+    Index i1 = qs.createIndex("tIndex", IndexType.FUNCTIONAL, "vals.secId",
+        SEPARATOR + "portfolio pf, pf.positions.values vals");
+    Index i2 = qs.createIndex("dIndex", IndexType.FUNCTIONAL, "pf.getCW(pf.ID)",
+        SEPARATOR + "portfolio pf");
+    Index i3 = qs.createIndex("fIndex", IndexType.FUNCTIONAL, "sIter",
+        SEPARATOR + "portfolio pf, pf.collectionHolderMap[(pf.ID).toString()].arr sIter");
+    Index i4 = qs.createIndex("cIndex", IndexType.FUNCTIONAL,
+        "pf.collectionHolderMap[(pf.ID).toString()].arr[pf.ID]", SEPARATOR + "portfolio pf");
+    Index i5 = qs.createIndex("inIndex", IndexType.FUNCTIONAL, "kIter.secId",
+        SEPARATOR + "portfolio['0'].positions.values kIter");
+    Index i6 = qs.createIndex("sIndex", IndexType.FUNCTIONAL, "pos.secId",
+        SEPARATOR + "portfolio.values val, val.positions.values pos");
+    Index i7 = qs.createIndex("p1Index", IndexType.PRIMARY_KEY, "pkid", SEPARATOR + "portfolio pf");
+    Index i8 = qs.createIndex("p2Index", IndexType.PRIMARY_KEY, "pk", SEPARATOR + "portfolio pf");
+    if (!i1.getCanonicalizedFromClause()
+        .equals(SEPARATOR + "portfolio index_iter1, index_iter1.positions.values index_iter2")
+        || !i1.getCanonicalizedIndexedExpression().equals("index_iter2.secId")
+        || !i1.getFromClause().equals(SEPARATOR + "portfolio pf, pf.positions.values vals")
+        || !i1.getIndexedExpression().equals("vals.secId")) {
+      fail("Mismatch found among fromClauses or IndexedExpressions");
+    }
+    if (!i2.getCanonicalizedFromClause().equals(SEPARATOR + "portfolio index_iter1")
+        || !i2.getCanonicalizedIndexedExpression().equals("index_iter1.getCW(index_iter1.ID)")
+        || !i2.getFromClause().equals(SEPARATOR + "portfolio pf")
+        || !i2.getIndexedExpression().equals("pf.getCW(pf.ID)")) {
+      fail("Mismatch found among fromClauses or IndexedExpressions");
+    }
+    if (!i3.getCanonicalizedFromClause().equals(
+        SEPARATOR
+            + "portfolio index_iter1, index_iter1.collectionHolderMap[index_iter1.ID.toString()].arr index_iter3")
+        || !i3.getCanonicalizedIndexedExpression().equals("index_iter3")
+        || !i3.getFromClause()
+            .equals(
+                SEPARATOR + "portfolio pf, pf.collectionHolderMap[(pf.ID).toString()].arr sIter")
+        || !i3.getIndexedExpression().equals("sIter")) {
+      fail("Mismatch found among fromClauses or IndexedExpressions");
+    }
+    if (!i4.getCanonicalizedFromClause().equals(SEPARATOR + "portfolio index_iter1")
+        || !i4.getCanonicalizedIndexedExpression().equals(
+            "index_iter1.collectionHolderMap[index_iter1.ID.toString()].arr[index_iter1.ID]")
+        || !i4.getFromClause().equals(SEPARATOR + "portfolio pf") || !i4.getIndexedExpression()
+            .equals("pf.collectionHolderMap[(pf.ID).toString()].arr[pf.ID]")) {
+      fail("Mismatch found among fromClauses or IndexedExpressions");
+    }
+    if (!i5.getCanonicalizedFromClause()
+        .equals(SEPARATOR + "portfolio['0'].positions.values index_iter4")
+        || !i5.getCanonicalizedIndexedExpression().equals("index_iter4.secId")
+        || !i5.getFromClause().equals(SEPARATOR + "portfolio['0'].positions.values kIter")
+        || !i5.getIndexedExpression().equals("kIter.secId")) {
+      fail("Mismatch found among fromClauses or IndexedExpressions");
+    }
+    if (!i6.getCanonicalizedFromClause()
+        .equals(
+            SEPARATOR + "portfolio.values index_iter5, index_iter5.positions.values index_iter6")
+        || !i6.getCanonicalizedIndexedExpression().equals("index_iter6.secId")
+        || !i6.getFromClause().equals(SEPARATOR + "portfolio.values val, val.positions.values pos")
+        || !i6.getIndexedExpression().equals("pos.secId")) {
+      fail("Mismatch found among fromClauses or IndexedExpressions");
+    }
+    if (!i7.getCanonicalizedFromClause().equals(SEPARATOR + "portfolio index_iter1")
+        || !i7.getCanonicalizedIndexedExpression().equals("index_iter1.pkid")
+        || !i7.getFromClause().equals(SEPARATOR + "portfolio pf")
+        || !i7.getIndexedExpression().equals("pkid")) {
+      fail("Mismatch found among fromClauses or IndexedExpressions");
+    }
+    if (!i8.getCanonicalizedFromClause().equals(SEPARATOR + "portfolio index_iter1")
+        || !i8.getCanonicalizedIndexedExpression().equals("index_iter1.pk")
+        || !i8.getFromClause().equals(SEPARATOR + "portfolio pf")
+        || !i8.getIndexedExpression().equals("pk")) {
+      fail("Mismatch found among fromClauses or IndexedExpressions");
+    }
+    qs.removeIndex(i1);
+    qs.removeIndex(i2);
+    qs.removeIndex(i3);
+    qs.removeIndex(i4);
+    qs.removeIndex(i5);
+    qs.removeIndex(i6);
+    qs.removeIndex(i7);
+    qs.removeIndex(i8);
+    Index i9 =
+        qs.createIndex("p3Index", IndexType.PRIMARY_KEY, "getPk", SEPARATOR + "portfolio pf");
+    if (!i9.getCanonicalizedFromClause().equals(SEPARATOR + "portfolio index_iter1")
+        || !i9.getCanonicalizedIndexedExpression().equals("index_iter1.pk")
+        || !i9.getFromClause().equals(SEPARATOR + "portfolio pf")
+        || !i9.getIndexedExpression().equals("getPk")) {
+      fail("Mismatch found among fromClauses or IndexedExpressions");
+    }
+    qs.removeIndex(i9);
+  }
+
+  @Test
+  public void numberOfIndexValuesStatIsUpdatedWhenEntryAdded() throws Exception {
+    CacheUtils.log(((CompactRangeIndex) index).dump());
+    IndexStatistics stats = index.getStatistics();
+    assertEquals(4, stats.getNumberOfValues());
+    region.put("4", new Portfolio(4));
+    CacheUtils.log(((CompactRangeIndex) index).dump());
+    stats = index.getStatistics();
+    assertEquals(5, stats.getNumberOfValues());
+    SelectResults results = region.query("status = 'active'");
+    assertEquals(3, results.size());
+  }
+
+  /**
+   * Needed to fix this since the key "4" was not found and the size was then redueced to 3 after
+   * invalidating the key 3
+   */
+  @Test
+  public void testInvalidatingEntry() throws Exception {
+    IndexStatistics stats = index.getStatistics();
+    region.invalidate("3");
+    assertEquals(3, stats.getNumberOfValues());
+    SelectResults results = region.query("status = 'active'");
+    assertEquals(2, results.size());
+  }
+
+  @Test
+  public void testDestroyEntry() throws Exception {
+    IndexStatistics stats = index.getStatistics();
+    region.put("4", new Portfolio(4));
+    region.destroy("4");
+    assertEquals(4, stats.getNumberOfValues());
+    SelectResults results = region.query("status = 'active'");
+    assertEquals(2, results.size());
+  }
+
+  // This test has a meaning only for Trunk code as it checks for Map implementation
+  // Tests for Region clear operations on Index in a Local VM
+  @Test
+  public void testIndexClearanceOnMapClear() {
+    try {
+      CacheUtils.getCache();
+      isInitDone = false;
+      Query q =
+          qs.newQuery("SELECT DISTINCT * FROM " + SEPARATOR + "portfolio where status = 'active'");
+      QueryObserverHolder.setInstance(new QueryObserverAdapter() {
+
+        @Override
+        public void afterIndexLookup(Collection coll) {
+          IndexMaintenanceJUnitTest.this.indexUsed = true;
+        }
+      });
+      SelectResults set = (SelectResults) q.execute();
+      if (set.size() == 0 || !this.indexUsed) {
+        fail("Either Size of the result set is zero or Index is not used ");
+      }
+      this.indexUsed = false;
+
+      region.clear();
+      set = (SelectResults) q.execute();
+      if (set.size() != 0 || !this.indexUsed) {
+        fail("Either Size of the result set is not zero or Index is not used ");
+      }
+    } catch (Exception e) {
+      e.printStackTrace();
+      fail(e.toString());
+    } finally {
+      isInitDone = false;
+      CacheUtils.restartCache();
+    }
+  }
+
+  // Asif : Tests for Region clear operations on Index in a Local VM for cases
+  // when a clear
+  // operation & region put operation occur concurrentlty
+  @Test
+  public void testConcurrentMapClearAndRegionPutOperation() {
+    try {
+      CacheUtils.getCache();
+      isInitDone = false;
+      Query q =
+          qs.newQuery("SELECT DISTINCT * FROM " + SEPARATOR + "portfolio where status = 'active'");
+      QueryObserverHolder.setInstance(new QueryObserverAdapter() {
+
+        @Override
+        public void afterIndexLookup(Collection coll) {
+          IndexMaintenanceJUnitTest.this.indexUsed = true;
+        }
+
+        @Override
+        public void beforeRerunningIndexCreationQuery() {
+          // Spawn a separate thread here which does a put opertion on region
+          Thread th = new Thread(new Runnable() {
+
+            @Override
+            public void run() {
+              // Assert that the size of region is now 0
+              assertTrue(region.size() == 0);
+              region.put("" + 8, new Portfolio(8));
+            }
+          });
+          th.start();
+          ThreadUtils.join(th, 30 * 1000);
+          assertTrue(region.size() == 1);
+        }
+      });
+      SelectResults set = (SelectResults) q.execute();
+      if (set.size() == 0 || !this.indexUsed) {
+        fail("Either Size of the result set is zero or Index is not used ");
+      }
+      this.indexUsed = false;
+      region.clear();
+      set = (SelectResults) q.execute();
+      if (set.size() != 1 || !this.indexUsed) {
+        fail("Either Size of the result set is not one or Index is not used ");
+      }
+    } catch (Exception e) {
+      e.printStackTrace();
+      fail(e.toString());
+    } finally {
+      isInitDone = false;
+      CacheUtils.restartCache();
+    }
+  }
+
+  @Test
+  public void testIndexUpdate() {

Review comment:
       This test doesn't seem to actually be testing anything about the behaviour of indexes, just that adding entries to the region results in more results being returned from a query, so it can probably be safely removed.

##########
File path: geode-core/src/integrationTest/java/org/apache/geode/cache/query/internal/index/IndexMaintenanceJUnitTest.java
##########
@@ -1057,6 +1071,394 @@ public void testBug43597() throws Exception {
     region.put("1", pf1);
   }
 
+  /**
+   * Starting of section - moved from wrongly spelled old class "IndexMaintainceJUnitTest".
+   * GEODE-1505
+   */
+
+  @Test
+  public void test000BUG32452()
+      throws IndexNameConflictException, IndexExistsException, RegionNotFoundException {
+    Index i1 = qs.createIndex("tIndex", IndexType.FUNCTIONAL, "vals.secId",
+        SEPARATOR + "portfolio pf, pf.positions.values vals");
+    Index i2 = qs.createIndex("dIndex", IndexType.FUNCTIONAL, "pf.getCW(pf.ID)",
+        SEPARATOR + "portfolio pf");
+    Index i3 = qs.createIndex("fIndex", IndexType.FUNCTIONAL, "sIter",
+        SEPARATOR + "portfolio pf, pf.collectionHolderMap[(pf.ID).toString()].arr sIter");
+    Index i4 = qs.createIndex("cIndex", IndexType.FUNCTIONAL,
+        "pf.collectionHolderMap[(pf.ID).toString()].arr[pf.ID]", SEPARATOR + "portfolio pf");
+    Index i5 = qs.createIndex("inIndex", IndexType.FUNCTIONAL, "kIter.secId",
+        SEPARATOR + "portfolio['0'].positions.values kIter");
+    Index i6 = qs.createIndex("sIndex", IndexType.FUNCTIONAL, "pos.secId",
+        SEPARATOR + "portfolio.values val, val.positions.values pos");
+    Index i7 = qs.createIndex("p1Index", IndexType.PRIMARY_KEY, "pkid", SEPARATOR + "portfolio pf");
+    Index i8 = qs.createIndex("p2Index", IndexType.PRIMARY_KEY, "pk", SEPARATOR + "portfolio pf");
+    if (!i1.getCanonicalizedFromClause()
+        .equals(SEPARATOR + "portfolio index_iter1, index_iter1.positions.values index_iter2")
+        || !i1.getCanonicalizedIndexedExpression().equals("index_iter2.secId")
+        || !i1.getFromClause().equals(SEPARATOR + "portfolio pf, pf.positions.values vals")
+        || !i1.getIndexedExpression().equals("vals.secId")) {
+      fail("Mismatch found among fromClauses or IndexedExpressions");
+    }
+    if (!i2.getCanonicalizedFromClause().equals(SEPARATOR + "portfolio index_iter1")
+        || !i2.getCanonicalizedIndexedExpression().equals("index_iter1.getCW(index_iter1.ID)")
+        || !i2.getFromClause().equals(SEPARATOR + "portfolio pf")
+        || !i2.getIndexedExpression().equals("pf.getCW(pf.ID)")) {
+      fail("Mismatch found among fromClauses or IndexedExpressions");
+    }
+    if (!i3.getCanonicalizedFromClause().equals(
+        SEPARATOR
+            + "portfolio index_iter1, index_iter1.collectionHolderMap[index_iter1.ID.toString()].arr index_iter3")
+        || !i3.getCanonicalizedIndexedExpression().equals("index_iter3")
+        || !i3.getFromClause()
+            .equals(
+                SEPARATOR + "portfolio pf, pf.collectionHolderMap[(pf.ID).toString()].arr sIter")
+        || !i3.getIndexedExpression().equals("sIter")) {
+      fail("Mismatch found among fromClauses or IndexedExpressions");
+    }
+    if (!i4.getCanonicalizedFromClause().equals(SEPARATOR + "portfolio index_iter1")
+        || !i4.getCanonicalizedIndexedExpression().equals(
+            "index_iter1.collectionHolderMap[index_iter1.ID.toString()].arr[index_iter1.ID]")
+        || !i4.getFromClause().equals(SEPARATOR + "portfolio pf") || !i4.getIndexedExpression()
+            .equals("pf.collectionHolderMap[(pf.ID).toString()].arr[pf.ID]")) {
+      fail("Mismatch found among fromClauses or IndexedExpressions");
+    }
+    if (!i5.getCanonicalizedFromClause()
+        .equals(SEPARATOR + "portfolio['0'].positions.values index_iter4")
+        || !i5.getCanonicalizedIndexedExpression().equals("index_iter4.secId")
+        || !i5.getFromClause().equals(SEPARATOR + "portfolio['0'].positions.values kIter")
+        || !i5.getIndexedExpression().equals("kIter.secId")) {
+      fail("Mismatch found among fromClauses or IndexedExpressions");
+    }
+    if (!i6.getCanonicalizedFromClause()
+        .equals(
+            SEPARATOR + "portfolio.values index_iter5, index_iter5.positions.values index_iter6")
+        || !i6.getCanonicalizedIndexedExpression().equals("index_iter6.secId")
+        || !i6.getFromClause().equals(SEPARATOR + "portfolio.values val, val.positions.values pos")
+        || !i6.getIndexedExpression().equals("pos.secId")) {
+      fail("Mismatch found among fromClauses or IndexedExpressions");
+    }
+    if (!i7.getCanonicalizedFromClause().equals(SEPARATOR + "portfolio index_iter1")
+        || !i7.getCanonicalizedIndexedExpression().equals("index_iter1.pkid")
+        || !i7.getFromClause().equals(SEPARATOR + "portfolio pf")
+        || !i7.getIndexedExpression().equals("pkid")) {
+      fail("Mismatch found among fromClauses or IndexedExpressions");
+    }
+    if (!i8.getCanonicalizedFromClause().equals(SEPARATOR + "portfolio index_iter1")
+        || !i8.getCanonicalizedIndexedExpression().equals("index_iter1.pk")
+        || !i8.getFromClause().equals(SEPARATOR + "portfolio pf")
+        || !i8.getIndexedExpression().equals("pk")) {
+      fail("Mismatch found among fromClauses or IndexedExpressions");
+    }
+    qs.removeIndex(i1);
+    qs.removeIndex(i2);
+    qs.removeIndex(i3);
+    qs.removeIndex(i4);
+    qs.removeIndex(i5);
+    qs.removeIndex(i6);
+    qs.removeIndex(i7);
+    qs.removeIndex(i8);
+    Index i9 =
+        qs.createIndex("p3Index", IndexType.PRIMARY_KEY, "getPk", SEPARATOR + "portfolio pf");
+    if (!i9.getCanonicalizedFromClause().equals(SEPARATOR + "portfolio index_iter1")
+        || !i9.getCanonicalizedIndexedExpression().equals("index_iter1.pk")
+        || !i9.getFromClause().equals(SEPARATOR + "portfolio pf")
+        || !i9.getIndexedExpression().equals("getPk")) {
+      fail("Mismatch found among fromClauses or IndexedExpressions");
+    }
+    qs.removeIndex(i9);
+  }
+
+  @Test
+  public void numberOfIndexValuesStatIsUpdatedWhenEntryAdded() throws Exception {
+    CacheUtils.log(((CompactRangeIndex) index).dump());
+    IndexStatistics stats = index.getStatistics();
+    assertEquals(4, stats.getNumberOfValues());
+    region.put("4", new Portfolio(4));
+    CacheUtils.log(((CompactRangeIndex) index).dump());
+    stats = index.getStatistics();
+    assertEquals(5, stats.getNumberOfValues());
+    SelectResults results = region.query("status = 'active'");
+    assertEquals(3, results.size());
+  }
+
+  /**
+   * Needed to fix this since the key "4" was not found and the size was then redueced to 3 after
+   * invalidating the key 3
+   */
+  @Test
+  public void testInvalidatingEntry() throws Exception {
+    IndexStatistics stats = index.getStatistics();
+    region.invalidate("3");
+    assertEquals(3, stats.getNumberOfValues());
+    SelectResults results = region.query("status = 'active'");
+    assertEquals(2, results.size());
+  }
+
+  @Test
+  public void testDestroyEntry() throws Exception {
+    IndexStatistics stats = index.getStatistics();
+    region.put("4", new Portfolio(4));
+    region.destroy("4");
+    assertEquals(4, stats.getNumberOfValues());
+    SelectResults results = region.query("status = 'active'");
+    assertEquals(2, results.size());
+  }
+
+  // This test has a meaning only for Trunk code as it checks for Map implementation
+  // Tests for Region clear operations on Index in a Local VM
+  @Test
+  public void testIndexClearanceOnMapClear() {

Review comment:
       This test might be better named "indexIsUsedForQueryWhenRegionIsEmpty"

##########
File path: geode-core/src/integrationTest/java/org/apache/geode/cache/query/internal/index/IndexMaintenanceJUnitTest.java
##########
@@ -1057,6 +1071,394 @@ public void testBug43597() throws Exception {
     region.put("1", pf1);
   }
 
+  /**
+   * Starting of section - moved from wrongly spelled old class "IndexMaintainceJUnitTest".
+   * GEODE-1505
+   */
+
+  @Test
+  public void test000BUG32452()
+      throws IndexNameConflictException, IndexExistsException, RegionNotFoundException {
+    Index i1 = qs.createIndex("tIndex", IndexType.FUNCTIONAL, "vals.secId",
+        SEPARATOR + "portfolio pf, pf.positions.values vals");
+    Index i2 = qs.createIndex("dIndex", IndexType.FUNCTIONAL, "pf.getCW(pf.ID)",
+        SEPARATOR + "portfolio pf");
+    Index i3 = qs.createIndex("fIndex", IndexType.FUNCTIONAL, "sIter",
+        SEPARATOR + "portfolio pf, pf.collectionHolderMap[(pf.ID).toString()].arr sIter");
+    Index i4 = qs.createIndex("cIndex", IndexType.FUNCTIONAL,
+        "pf.collectionHolderMap[(pf.ID).toString()].arr[pf.ID]", SEPARATOR + "portfolio pf");
+    Index i5 = qs.createIndex("inIndex", IndexType.FUNCTIONAL, "kIter.secId",
+        SEPARATOR + "portfolio['0'].positions.values kIter");
+    Index i6 = qs.createIndex("sIndex", IndexType.FUNCTIONAL, "pos.secId",
+        SEPARATOR + "portfolio.values val, val.positions.values pos");
+    Index i7 = qs.createIndex("p1Index", IndexType.PRIMARY_KEY, "pkid", SEPARATOR + "portfolio pf");
+    Index i8 = qs.createIndex("p2Index", IndexType.PRIMARY_KEY, "pk", SEPARATOR + "portfolio pf");
+    if (!i1.getCanonicalizedFromClause()
+        .equals(SEPARATOR + "portfolio index_iter1, index_iter1.positions.values index_iter2")
+        || !i1.getCanonicalizedIndexedExpression().equals("index_iter2.secId")
+        || !i1.getFromClause().equals(SEPARATOR + "portfolio pf, pf.positions.values vals")
+        || !i1.getIndexedExpression().equals("vals.secId")) {
+      fail("Mismatch found among fromClauses or IndexedExpressions");
+    }
+    if (!i2.getCanonicalizedFromClause().equals(SEPARATOR + "portfolio index_iter1")
+        || !i2.getCanonicalizedIndexedExpression().equals("index_iter1.getCW(index_iter1.ID)")
+        || !i2.getFromClause().equals(SEPARATOR + "portfolio pf")
+        || !i2.getIndexedExpression().equals("pf.getCW(pf.ID)")) {
+      fail("Mismatch found among fromClauses or IndexedExpressions");
+    }
+    if (!i3.getCanonicalizedFromClause().equals(
+        SEPARATOR
+            + "portfolio index_iter1, index_iter1.collectionHolderMap[index_iter1.ID.toString()].arr index_iter3")
+        || !i3.getCanonicalizedIndexedExpression().equals("index_iter3")
+        || !i3.getFromClause()
+            .equals(
+                SEPARATOR + "portfolio pf, pf.collectionHolderMap[(pf.ID).toString()].arr sIter")
+        || !i3.getIndexedExpression().equals("sIter")) {
+      fail("Mismatch found among fromClauses or IndexedExpressions");
+    }
+    if (!i4.getCanonicalizedFromClause().equals(SEPARATOR + "portfolio index_iter1")
+        || !i4.getCanonicalizedIndexedExpression().equals(
+            "index_iter1.collectionHolderMap[index_iter1.ID.toString()].arr[index_iter1.ID]")
+        || !i4.getFromClause().equals(SEPARATOR + "portfolio pf") || !i4.getIndexedExpression()
+            .equals("pf.collectionHolderMap[(pf.ID).toString()].arr[pf.ID]")) {
+      fail("Mismatch found among fromClauses or IndexedExpressions");
+    }
+    if (!i5.getCanonicalizedFromClause()
+        .equals(SEPARATOR + "portfolio['0'].positions.values index_iter4")
+        || !i5.getCanonicalizedIndexedExpression().equals("index_iter4.secId")
+        || !i5.getFromClause().equals(SEPARATOR + "portfolio['0'].positions.values kIter")
+        || !i5.getIndexedExpression().equals("kIter.secId")) {
+      fail("Mismatch found among fromClauses or IndexedExpressions");
+    }
+    if (!i6.getCanonicalizedFromClause()
+        .equals(
+            SEPARATOR + "portfolio.values index_iter5, index_iter5.positions.values index_iter6")
+        || !i6.getCanonicalizedIndexedExpression().equals("index_iter6.secId")
+        || !i6.getFromClause().equals(SEPARATOR + "portfolio.values val, val.positions.values pos")
+        || !i6.getIndexedExpression().equals("pos.secId")) {
+      fail("Mismatch found among fromClauses or IndexedExpressions");
+    }
+    if (!i7.getCanonicalizedFromClause().equals(SEPARATOR + "portfolio index_iter1")
+        || !i7.getCanonicalizedIndexedExpression().equals("index_iter1.pkid")
+        || !i7.getFromClause().equals(SEPARATOR + "portfolio pf")
+        || !i7.getIndexedExpression().equals("pkid")) {
+      fail("Mismatch found among fromClauses or IndexedExpressions");
+    }
+    if (!i8.getCanonicalizedFromClause().equals(SEPARATOR + "portfolio index_iter1")
+        || !i8.getCanonicalizedIndexedExpression().equals("index_iter1.pk")
+        || !i8.getFromClause().equals(SEPARATOR + "portfolio pf")
+        || !i8.getIndexedExpression().equals("pk")) {
+      fail("Mismatch found among fromClauses or IndexedExpressions");
+    }
+    qs.removeIndex(i1);
+    qs.removeIndex(i2);
+    qs.removeIndex(i3);
+    qs.removeIndex(i4);
+    qs.removeIndex(i5);
+    qs.removeIndex(i6);
+    qs.removeIndex(i7);
+    qs.removeIndex(i8);
+    Index i9 =
+        qs.createIndex("p3Index", IndexType.PRIMARY_KEY, "getPk", SEPARATOR + "portfolio pf");
+    if (!i9.getCanonicalizedFromClause().equals(SEPARATOR + "portfolio index_iter1")
+        || !i9.getCanonicalizedIndexedExpression().equals("index_iter1.pk")
+        || !i9.getFromClause().equals(SEPARATOR + "portfolio pf")
+        || !i9.getIndexedExpression().equals("getPk")) {
+      fail("Mismatch found among fromClauses or IndexedExpressions");
+    }
+    qs.removeIndex(i9);
+  }
+
+  @Test
+  public void numberOfIndexValuesStatIsUpdatedWhenEntryAdded() throws Exception {
+    CacheUtils.log(((CompactRangeIndex) index).dump());
+    IndexStatistics stats = index.getStatistics();
+    assertEquals(4, stats.getNumberOfValues());
+    region.put("4", new Portfolio(4));
+    CacheUtils.log(((CompactRangeIndex) index).dump());
+    stats = index.getStatistics();
+    assertEquals(5, stats.getNumberOfValues());
+    SelectResults results = region.query("status = 'active'");
+    assertEquals(3, results.size());
+  }
+
+  /**
+   * Needed to fix this since the key "4" was not found and the size was then redueced to 3 after
+   * invalidating the key 3
+   */
+  @Test
+  public void testInvalidatingEntry() throws Exception {
+    IndexStatistics stats = index.getStatistics();
+    region.invalidate("3");
+    assertEquals(3, stats.getNumberOfValues());
+    SelectResults results = region.query("status = 'active'");
+    assertEquals(2, results.size());
+  }
+
+  @Test
+  public void testDestroyEntry() throws Exception {

Review comment:
       This test might be better named "numberOfIndexValuesStatIsUpdatedWhenEntryDestroyed"

##########
File path: geode-core/src/integrationTest/java/org/apache/geode/cache/query/internal/index/IndexMaintenanceJUnitTest.java
##########
@@ -1057,6 +1071,394 @@ public void testBug43597() throws Exception {
     region.put("1", pf1);
   }
 
+  /**
+   * Starting of section - moved from wrongly spelled old class "IndexMaintainceJUnitTest".
+   * GEODE-1505
+   */
+
+  @Test
+  public void test000BUG32452()
+      throws IndexNameConflictException, IndexExistsException, RegionNotFoundException {
+    Index i1 = qs.createIndex("tIndex", IndexType.FUNCTIONAL, "vals.secId",
+        SEPARATOR + "portfolio pf, pf.positions.values vals");
+    Index i2 = qs.createIndex("dIndex", IndexType.FUNCTIONAL, "pf.getCW(pf.ID)",
+        SEPARATOR + "portfolio pf");
+    Index i3 = qs.createIndex("fIndex", IndexType.FUNCTIONAL, "sIter",
+        SEPARATOR + "portfolio pf, pf.collectionHolderMap[(pf.ID).toString()].arr sIter");
+    Index i4 = qs.createIndex("cIndex", IndexType.FUNCTIONAL,
+        "pf.collectionHolderMap[(pf.ID).toString()].arr[pf.ID]", SEPARATOR + "portfolio pf");
+    Index i5 = qs.createIndex("inIndex", IndexType.FUNCTIONAL, "kIter.secId",
+        SEPARATOR + "portfolio['0'].positions.values kIter");
+    Index i6 = qs.createIndex("sIndex", IndexType.FUNCTIONAL, "pos.secId",
+        SEPARATOR + "portfolio.values val, val.positions.values pos");
+    Index i7 = qs.createIndex("p1Index", IndexType.PRIMARY_KEY, "pkid", SEPARATOR + "portfolio pf");
+    Index i8 = qs.createIndex("p2Index", IndexType.PRIMARY_KEY, "pk", SEPARATOR + "portfolio pf");
+    if (!i1.getCanonicalizedFromClause()
+        .equals(SEPARATOR + "portfolio index_iter1, index_iter1.positions.values index_iter2")
+        || !i1.getCanonicalizedIndexedExpression().equals("index_iter2.secId")
+        || !i1.getFromClause().equals(SEPARATOR + "portfolio pf, pf.positions.values vals")
+        || !i1.getIndexedExpression().equals("vals.secId")) {
+      fail("Mismatch found among fromClauses or IndexedExpressions");
+    }
+    if (!i2.getCanonicalizedFromClause().equals(SEPARATOR + "portfolio index_iter1")
+        || !i2.getCanonicalizedIndexedExpression().equals("index_iter1.getCW(index_iter1.ID)")
+        || !i2.getFromClause().equals(SEPARATOR + "portfolio pf")
+        || !i2.getIndexedExpression().equals("pf.getCW(pf.ID)")) {
+      fail("Mismatch found among fromClauses or IndexedExpressions");
+    }
+    if (!i3.getCanonicalizedFromClause().equals(
+        SEPARATOR
+            + "portfolio index_iter1, index_iter1.collectionHolderMap[index_iter1.ID.toString()].arr index_iter3")
+        || !i3.getCanonicalizedIndexedExpression().equals("index_iter3")
+        || !i3.getFromClause()
+            .equals(
+                SEPARATOR + "portfolio pf, pf.collectionHolderMap[(pf.ID).toString()].arr sIter")
+        || !i3.getIndexedExpression().equals("sIter")) {
+      fail("Mismatch found among fromClauses or IndexedExpressions");
+    }
+    if (!i4.getCanonicalizedFromClause().equals(SEPARATOR + "portfolio index_iter1")
+        || !i4.getCanonicalizedIndexedExpression().equals(
+            "index_iter1.collectionHolderMap[index_iter1.ID.toString()].arr[index_iter1.ID]")
+        || !i4.getFromClause().equals(SEPARATOR + "portfolio pf") || !i4.getIndexedExpression()
+            .equals("pf.collectionHolderMap[(pf.ID).toString()].arr[pf.ID]")) {
+      fail("Mismatch found among fromClauses or IndexedExpressions");
+    }
+    if (!i5.getCanonicalizedFromClause()
+        .equals(SEPARATOR + "portfolio['0'].positions.values index_iter4")
+        || !i5.getCanonicalizedIndexedExpression().equals("index_iter4.secId")
+        || !i5.getFromClause().equals(SEPARATOR + "portfolio['0'].positions.values kIter")
+        || !i5.getIndexedExpression().equals("kIter.secId")) {
+      fail("Mismatch found among fromClauses or IndexedExpressions");
+    }
+    if (!i6.getCanonicalizedFromClause()
+        .equals(
+            SEPARATOR + "portfolio.values index_iter5, index_iter5.positions.values index_iter6")
+        || !i6.getCanonicalizedIndexedExpression().equals("index_iter6.secId")
+        || !i6.getFromClause().equals(SEPARATOR + "portfolio.values val, val.positions.values pos")
+        || !i6.getIndexedExpression().equals("pos.secId")) {
+      fail("Mismatch found among fromClauses or IndexedExpressions");
+    }
+    if (!i7.getCanonicalizedFromClause().equals(SEPARATOR + "portfolio index_iter1")
+        || !i7.getCanonicalizedIndexedExpression().equals("index_iter1.pkid")
+        || !i7.getFromClause().equals(SEPARATOR + "portfolio pf")
+        || !i7.getIndexedExpression().equals("pkid")) {
+      fail("Mismatch found among fromClauses or IndexedExpressions");
+    }
+    if (!i8.getCanonicalizedFromClause().equals(SEPARATOR + "portfolio index_iter1")
+        || !i8.getCanonicalizedIndexedExpression().equals("index_iter1.pk")
+        || !i8.getFromClause().equals(SEPARATOR + "portfolio pf")
+        || !i8.getIndexedExpression().equals("pk")) {
+      fail("Mismatch found among fromClauses or IndexedExpressions");
+    }
+    qs.removeIndex(i1);
+    qs.removeIndex(i2);
+    qs.removeIndex(i3);
+    qs.removeIndex(i4);
+    qs.removeIndex(i5);
+    qs.removeIndex(i6);
+    qs.removeIndex(i7);
+    qs.removeIndex(i8);
+    Index i9 =
+        qs.createIndex("p3Index", IndexType.PRIMARY_KEY, "getPk", SEPARATOR + "portfolio pf");
+    if (!i9.getCanonicalizedFromClause().equals(SEPARATOR + "portfolio index_iter1")
+        || !i9.getCanonicalizedIndexedExpression().equals("index_iter1.pk")
+        || !i9.getFromClause().equals(SEPARATOR + "portfolio pf")
+        || !i9.getIndexedExpression().equals("getPk")) {
+      fail("Mismatch found among fromClauses or IndexedExpressions");
+    }
+    qs.removeIndex(i9);
+  }
+
+  @Test
+  public void numberOfIndexValuesStatIsUpdatedWhenEntryAdded() throws Exception {
+    CacheUtils.log(((CompactRangeIndex) index).dump());
+    IndexStatistics stats = index.getStatistics();
+    assertEquals(4, stats.getNumberOfValues());
+    region.put("4", new Portfolio(4));
+    CacheUtils.log(((CompactRangeIndex) index).dump());
+    stats = index.getStatistics();
+    assertEquals(5, stats.getNumberOfValues());
+    SelectResults results = region.query("status = 'active'");
+    assertEquals(3, results.size());
+  }
+
+  /**
+   * Needed to fix this since the key "4" was not found and the size was then redueced to 3 after
+   * invalidating the key 3
+   */
+  @Test
+  public void testInvalidatingEntry() throws Exception {
+    IndexStatistics stats = index.getStatistics();
+    region.invalidate("3");
+    assertEquals(3, stats.getNumberOfValues());
+    SelectResults results = region.query("status = 'active'");
+    assertEquals(2, results.size());
+  }
+
+  @Test
+  public void testDestroyEntry() throws Exception {
+    IndexStatistics stats = index.getStatistics();
+    region.put("4", new Portfolio(4));
+    region.destroy("4");
+    assertEquals(4, stats.getNumberOfValues());
+    SelectResults results = region.query("status = 'active'");
+    assertEquals(2, results.size());
+  }
+
+  // This test has a meaning only for Trunk code as it checks for Map implementation
+  // Tests for Region clear operations on Index in a Local VM
+  @Test
+  public void testIndexClearanceOnMapClear() {
+    try {
+      CacheUtils.getCache();
+      isInitDone = false;
+      Query q =
+          qs.newQuery("SELECT DISTINCT * FROM " + SEPARATOR + "portfolio where status = 'active'");
+      QueryObserverHolder.setInstance(new QueryObserverAdapter() {
+
+        @Override
+        public void afterIndexLookup(Collection coll) {
+          IndexMaintenanceJUnitTest.this.indexUsed = true;
+        }
+      });
+      SelectResults set = (SelectResults) q.execute();
+      if (set.size() == 0 || !this.indexUsed) {
+        fail("Either Size of the result set is zero or Index is not used ");
+      }
+      this.indexUsed = false;
+
+      region.clear();
+      set = (SelectResults) q.execute();
+      if (set.size() != 0 || !this.indexUsed) {
+        fail("Either Size of the result set is not zero or Index is not used ");
+      }
+    } catch (Exception e) {
+      e.printStackTrace();
+      fail(e.toString());
+    } finally {
+      isInitDone = false;
+      CacheUtils.restartCache();
+    }
+  }
+
+  // Asif : Tests for Region clear operations on Index in a Local VM for cases
+  // when a clear
+  // operation & region put operation occur concurrentlty
+  @Test
+  public void testConcurrentMapClearAndRegionPutOperation() {
+    try {
+      CacheUtils.getCache();
+      isInitDone = false;
+      Query q =
+          qs.newQuery("SELECT DISTINCT * FROM " + SEPARATOR + "portfolio where status = 'active'");
+      QueryObserverHolder.setInstance(new QueryObserverAdapter() {
+
+        @Override
+        public void afterIndexLookup(Collection coll) {
+          IndexMaintenanceJUnitTest.this.indexUsed = true;
+        }
+
+        @Override
+        public void beforeRerunningIndexCreationQuery() {
+          // Spawn a separate thread here which does a put opertion on region
+          Thread th = new Thread(new Runnable() {
+
+            @Override
+            public void run() {
+              // Assert that the size of region is now 0
+              assertTrue(region.size() == 0);
+              region.put("" + 8, new Portfolio(8));
+            }
+          });
+          th.start();
+          ThreadUtils.join(th, 30 * 1000);
+          assertTrue(region.size() == 1);
+        }
+      });
+      SelectResults set = (SelectResults) q.execute();
+      if (set.size() == 0 || !this.indexUsed) {
+        fail("Either Size of the result set is zero or Index is not used ");
+      }
+      this.indexUsed = false;
+      region.clear();
+      set = (SelectResults) q.execute();
+      if (set.size() != 1 || !this.indexUsed) {
+        fail("Either Size of the result set is not one or Index is not used ");
+      }
+    } catch (Exception e) {
+      e.printStackTrace();
+      fail(e.toString());
+    } finally {
+      isInitDone = false;
+      CacheUtils.restartCache();
+    }
+  }
+
+  @Test
+  public void testIndexUpdate() {
+    try {
+      CacheUtils.getCache();
+      isInitDone = false;
+      qs.removeIndexes();
+
+      index = (IndexProtocol) qs.createIndex("statusIndex", IndexType.FUNCTIONAL, "pos.secId",
+          SEPARATOR + "portfolio p , p.positions.values pos");
+      String queryStr =
+          "Select distinct pf from " + SEPARATOR
+              + "portfolio pf , pf.positions.values ps where ps.secId='SUN'";
+
+      Query query = qs.newQuery(queryStr);
+      SelectResults rs = (SelectResults) query.execute();
+      int size1 = rs.size();
+      for (int i = 4; i < 50; ++i) {
+        region.put("" + i, new Portfolio(i));
+      }
+      rs = (SelectResults) query.execute();
+      int size2 = rs.size();
+      assertTrue(size2 > size1);
+    } catch (Exception e) {
+      e.printStackTrace();
+      fail("Test failed due to exception=" + e);
+    } finally {
+      isInitDone = false;
+      CacheUtils.restartCache();
+    }
+
+  }
+
+  /**
+   * Test to compare range and compact index. They should return the same results.
+   */
+  @Test
+  public void testCompareRangeAndCompactIndex() {

Review comment:
       This test might be better named "rangeAndCompactIndexesShouldReturnTheSameResults"

##########
File path: geode-core/src/integrationTest/java/org/apache/geode/cache/query/internal/index/IndexMaintenanceJUnitTest.java
##########
@@ -1057,6 +1071,394 @@ public void testBug43597() throws Exception {
     region.put("1", pf1);
   }
 
+  /**
+   * Starting of section - moved from wrongly spelled old class "IndexMaintainceJUnitTest".
+   * GEODE-1505
+   */
+
+  @Test
+  public void test000BUG32452()

Review comment:
       This test might be better named "fromClausesAndIndexedExpressionsMatchExpectedValues"

##########
File path: geode-core/src/integrationTest/java/org/apache/geode/cache/query/internal/index/IndexMaintenanceJUnitTest.java
##########
@@ -1057,6 +1071,394 @@ public void testBug43597() throws Exception {
     region.put("1", pf1);
   }
 
+  /**
+   * Starting of section - moved from wrongly spelled old class "IndexMaintainceJUnitTest".
+   * GEODE-1505
+   */
+
+  @Test
+  public void test000BUG32452()
+      throws IndexNameConflictException, IndexExistsException, RegionNotFoundException {
+    Index i1 = qs.createIndex("tIndex", IndexType.FUNCTIONAL, "vals.secId",
+        SEPARATOR + "portfolio pf, pf.positions.values vals");
+    Index i2 = qs.createIndex("dIndex", IndexType.FUNCTIONAL, "pf.getCW(pf.ID)",
+        SEPARATOR + "portfolio pf");
+    Index i3 = qs.createIndex("fIndex", IndexType.FUNCTIONAL, "sIter",
+        SEPARATOR + "portfolio pf, pf.collectionHolderMap[(pf.ID).toString()].arr sIter");
+    Index i4 = qs.createIndex("cIndex", IndexType.FUNCTIONAL,
+        "pf.collectionHolderMap[(pf.ID).toString()].arr[pf.ID]", SEPARATOR + "portfolio pf");
+    Index i5 = qs.createIndex("inIndex", IndexType.FUNCTIONAL, "kIter.secId",
+        SEPARATOR + "portfolio['0'].positions.values kIter");
+    Index i6 = qs.createIndex("sIndex", IndexType.FUNCTIONAL, "pos.secId",
+        SEPARATOR + "portfolio.values val, val.positions.values pos");
+    Index i7 = qs.createIndex("p1Index", IndexType.PRIMARY_KEY, "pkid", SEPARATOR + "portfolio pf");
+    Index i8 = qs.createIndex("p2Index", IndexType.PRIMARY_KEY, "pk", SEPARATOR + "portfolio pf");
+    if (!i1.getCanonicalizedFromClause()
+        .equals(SEPARATOR + "portfolio index_iter1, index_iter1.positions.values index_iter2")
+        || !i1.getCanonicalizedIndexedExpression().equals("index_iter2.secId")
+        || !i1.getFromClause().equals(SEPARATOR + "portfolio pf, pf.positions.values vals")
+        || !i1.getIndexedExpression().equals("vals.secId")) {
+      fail("Mismatch found among fromClauses or IndexedExpressions");
+    }
+    if (!i2.getCanonicalizedFromClause().equals(SEPARATOR + "portfolio index_iter1")
+        || !i2.getCanonicalizedIndexedExpression().equals("index_iter1.getCW(index_iter1.ID)")
+        || !i2.getFromClause().equals(SEPARATOR + "portfolio pf")
+        || !i2.getIndexedExpression().equals("pf.getCW(pf.ID)")) {
+      fail("Mismatch found among fromClauses or IndexedExpressions");
+    }
+    if (!i3.getCanonicalizedFromClause().equals(
+        SEPARATOR
+            + "portfolio index_iter1, index_iter1.collectionHolderMap[index_iter1.ID.toString()].arr index_iter3")
+        || !i3.getCanonicalizedIndexedExpression().equals("index_iter3")
+        || !i3.getFromClause()
+            .equals(
+                SEPARATOR + "portfolio pf, pf.collectionHolderMap[(pf.ID).toString()].arr sIter")
+        || !i3.getIndexedExpression().equals("sIter")) {
+      fail("Mismatch found among fromClauses or IndexedExpressions");
+    }
+    if (!i4.getCanonicalizedFromClause().equals(SEPARATOR + "portfolio index_iter1")
+        || !i4.getCanonicalizedIndexedExpression().equals(
+            "index_iter1.collectionHolderMap[index_iter1.ID.toString()].arr[index_iter1.ID]")
+        || !i4.getFromClause().equals(SEPARATOR + "portfolio pf") || !i4.getIndexedExpression()
+            .equals("pf.collectionHolderMap[(pf.ID).toString()].arr[pf.ID]")) {
+      fail("Mismatch found among fromClauses or IndexedExpressions");
+    }
+    if (!i5.getCanonicalizedFromClause()
+        .equals(SEPARATOR + "portfolio['0'].positions.values index_iter4")
+        || !i5.getCanonicalizedIndexedExpression().equals("index_iter4.secId")
+        || !i5.getFromClause().equals(SEPARATOR + "portfolio['0'].positions.values kIter")
+        || !i5.getIndexedExpression().equals("kIter.secId")) {
+      fail("Mismatch found among fromClauses or IndexedExpressions");
+    }
+    if (!i6.getCanonicalizedFromClause()
+        .equals(
+            SEPARATOR + "portfolio.values index_iter5, index_iter5.positions.values index_iter6")
+        || !i6.getCanonicalizedIndexedExpression().equals("index_iter6.secId")
+        || !i6.getFromClause().equals(SEPARATOR + "portfolio.values val, val.positions.values pos")
+        || !i6.getIndexedExpression().equals("pos.secId")) {
+      fail("Mismatch found among fromClauses or IndexedExpressions");
+    }
+    if (!i7.getCanonicalizedFromClause().equals(SEPARATOR + "portfolio index_iter1")
+        || !i7.getCanonicalizedIndexedExpression().equals("index_iter1.pkid")
+        || !i7.getFromClause().equals(SEPARATOR + "portfolio pf")
+        || !i7.getIndexedExpression().equals("pkid")) {
+      fail("Mismatch found among fromClauses or IndexedExpressions");
+    }
+    if (!i8.getCanonicalizedFromClause().equals(SEPARATOR + "portfolio index_iter1")
+        || !i8.getCanonicalizedIndexedExpression().equals("index_iter1.pk")
+        || !i8.getFromClause().equals(SEPARATOR + "portfolio pf")
+        || !i8.getIndexedExpression().equals("pk")) {
+      fail("Mismatch found among fromClauses or IndexedExpressions");
+    }
+    qs.removeIndex(i1);
+    qs.removeIndex(i2);
+    qs.removeIndex(i3);
+    qs.removeIndex(i4);
+    qs.removeIndex(i5);
+    qs.removeIndex(i6);
+    qs.removeIndex(i7);
+    qs.removeIndex(i8);
+    Index i9 =
+        qs.createIndex("p3Index", IndexType.PRIMARY_KEY, "getPk", SEPARATOR + "portfolio pf");
+    if (!i9.getCanonicalizedFromClause().equals(SEPARATOR + "portfolio index_iter1")
+        || !i9.getCanonicalizedIndexedExpression().equals("index_iter1.pk")
+        || !i9.getFromClause().equals(SEPARATOR + "portfolio pf")
+        || !i9.getIndexedExpression().equals("getPk")) {
+      fail("Mismatch found among fromClauses or IndexedExpressions");
+    }
+    qs.removeIndex(i9);
+  }
+
+  @Test
+  public void numberOfIndexValuesStatIsUpdatedWhenEntryAdded() throws Exception {
+    CacheUtils.log(((CompactRangeIndex) index).dump());
+    IndexStatistics stats = index.getStatistics();
+    assertEquals(4, stats.getNumberOfValues());
+    region.put("4", new Portfolio(4));
+    CacheUtils.log(((CompactRangeIndex) index).dump());
+    stats = index.getStatistics();
+    assertEquals(5, stats.getNumberOfValues());
+    SelectResults results = region.query("status = 'active'");
+    assertEquals(3, results.size());
+  }
+
+  /**
+   * Needed to fix this since the key "4" was not found and the size was then redueced to 3 after
+   * invalidating the key 3
+   */
+  @Test
+  public void testInvalidatingEntry() throws Exception {
+    IndexStatistics stats = index.getStatistics();
+    region.invalidate("3");
+    assertEquals(3, stats.getNumberOfValues());
+    SelectResults results = region.query("status = 'active'");
+    assertEquals(2, results.size());
+  }
+
+  @Test
+  public void testDestroyEntry() throws Exception {
+    IndexStatistics stats = index.getStatistics();
+    region.put("4", new Portfolio(4));
+    region.destroy("4");
+    assertEquals(4, stats.getNumberOfValues());
+    SelectResults results = region.query("status = 'active'");
+    assertEquals(2, results.size());
+  }
+
+  // This test has a meaning only for Trunk code as it checks for Map implementation
+  // Tests for Region clear operations on Index in a Local VM
+  @Test
+  public void testIndexClearanceOnMapClear() {
+    try {
+      CacheUtils.getCache();
+      isInitDone = false;
+      Query q =
+          qs.newQuery("SELECT DISTINCT * FROM " + SEPARATOR + "portfolio where status = 'active'");
+      QueryObserverHolder.setInstance(new QueryObserverAdapter() {
+
+        @Override
+        public void afterIndexLookup(Collection coll) {
+          IndexMaintenanceJUnitTest.this.indexUsed = true;
+        }
+      });
+      SelectResults set = (SelectResults) q.execute();
+      if (set.size() == 0 || !this.indexUsed) {
+        fail("Either Size of the result set is zero or Index is not used ");
+      }
+      this.indexUsed = false;
+
+      region.clear();
+      set = (SelectResults) q.execute();
+      if (set.size() != 0 || !this.indexUsed) {
+        fail("Either Size of the result set is not zero or Index is not used ");
+      }
+    } catch (Exception e) {
+      e.printStackTrace();
+      fail(e.toString());
+    } finally {
+      isInitDone = false;
+      CacheUtils.restartCache();
+    }
+  }
+
+  // Asif : Tests for Region clear operations on Index in a Local VM for cases
+  // when a clear
+  // operation & region put operation occur concurrentlty
+  @Test
+  public void testConcurrentMapClearAndRegionPutOperation() {
+    try {
+      CacheUtils.getCache();
+      isInitDone = false;
+      Query q =
+          qs.newQuery("SELECT DISTINCT * FROM " + SEPARATOR + "portfolio where status = 'active'");
+      QueryObserverHolder.setInstance(new QueryObserverAdapter() {
+
+        @Override
+        public void afterIndexLookup(Collection coll) {
+          IndexMaintenanceJUnitTest.this.indexUsed = true;
+        }
+
+        @Override
+        public void beforeRerunningIndexCreationQuery() {
+          // Spawn a separate thread here which does a put opertion on region
+          Thread th = new Thread(new Runnable() {
+
+            @Override
+            public void run() {
+              // Assert that the size of region is now 0
+              assertTrue(region.size() == 0);
+              region.put("" + 8, new Portfolio(8));
+            }
+          });
+          th.start();
+          ThreadUtils.join(th, 30 * 1000);
+          assertTrue(region.size() == 1);
+        }
+      });
+      SelectResults set = (SelectResults) q.execute();
+      if (set.size() == 0 || !this.indexUsed) {
+        fail("Either Size of the result set is zero or Index is not used ");
+      }
+      this.indexUsed = false;
+      region.clear();
+      set = (SelectResults) q.execute();
+      if (set.size() != 1 || !this.indexUsed) {
+        fail("Either Size of the result set is not one or Index is not used ");
+      }
+    } catch (Exception e) {
+      e.printStackTrace();
+      fail(e.toString());
+    } finally {
+      isInitDone = false;
+      CacheUtils.restartCache();
+    }
+  }
+
+  @Test
+  public void testIndexUpdate() {
+    try {
+      CacheUtils.getCache();
+      isInitDone = false;
+      qs.removeIndexes();
+
+      index = (IndexProtocol) qs.createIndex("statusIndex", IndexType.FUNCTIONAL, "pos.secId",
+          SEPARATOR + "portfolio p , p.positions.values pos");
+      String queryStr =
+          "Select distinct pf from " + SEPARATOR
+              + "portfolio pf , pf.positions.values ps where ps.secId='SUN'";
+
+      Query query = qs.newQuery(queryStr);
+      SelectResults rs = (SelectResults) query.execute();
+      int size1 = rs.size();
+      for (int i = 4; i < 50; ++i) {
+        region.put("" + i, new Portfolio(i));
+      }
+      rs = (SelectResults) query.execute();
+      int size2 = rs.size();
+      assertTrue(size2 > size1);
+    } catch (Exception e) {
+      e.printStackTrace();
+      fail("Test failed due to exception=" + e);
+    } finally {
+      isInitDone = false;
+      CacheUtils.restartCache();
+    }
+
+  }
+
+  /**
+   * Test to compare range and compact index. They should return the same results.
+   */
+  @Test
+  public void testCompareRangeAndCompactIndex() {
+    try {
+      // CacheUtils.restartCache();
+      if (!isInitDone) {
+        isInitDone = true;
+      }
+      qs.removeIndexes();
+
+      String[] queryStr =
+          new String[] {"Select status from " + SEPARATOR + "portfolio pf where status='active'",
+              "Select pf.ID from " + SEPARATOR + "portfolio pf where pf.ID > 2 and pf.ID < 100",
+              "Select * from " + SEPARATOR + "portfolio pf where pf.position1.secId > '2'",};
+
+      String[] queryFields = new String[] {"status", "ID", "position1.secId",};
+
+      for (int i = 0; i < queryStr.length; i++) {
+        // Clear indexes if any.
+        qs.removeIndexes();
+
+        // initialize region.
+        region.clear();
+        for (int k = 0; k < 10; k++) {
+          region.put("" + k, new Portfolio(k));
+        }
+
+        for (int j = 0; j < 1; j++) { // With different region size.
+          // Update Region.
+          for (int k = 0; k < (j * 100); k++) {
+            region.put("" + k, new Portfolio(k));
+          }
+
+          // Create compact index.
+          IndexManager.TEST_RANGEINDEX_ONLY = false;
+          index = (IndexProtocol) qs.createIndex(queryFields[i] + "Index", IndexType.FUNCTIONAL,
+              queryFields[i], SEPARATOR + "portfolio");
+
+          // Execute Query.
+          SelectResults[][] rs = new SelectResults[1][2];
+          Query query = qs.newQuery(queryStr[i]);
+          rs[0][0] = (SelectResults) query.execute();
+
+          // remove compact index.
+          qs.removeIndexes();
+
+          // Create Range Index.
+          IndexManager.TEST_RANGEINDEX_ONLY = true;
+          index = (IndexProtocol) qs.createIndex(queryFields[i] + "rIndex", IndexType.FUNCTIONAL,
+              queryFields[i], SEPARATOR + "portfolio");
+
+          query = qs.newQuery(queryStr[i]);
+          rs[0][1] = (SelectResults) query.execute();
+
+          CacheUtils.log(
+              "#### rs1 size is : " + (rs[0][0]).size() + " rs2 size is : " + (rs[0][1]).size());
+          StructSetOrResultsSet ssORrs = new StructSetOrResultsSet();
+          ssORrs.CompareQueryResultsWithoutAndWithIndexes(rs, 1, queryStr);
+        }
+      }
+    } catch (Exception e) {
+      e.printStackTrace();
+      fail("Test failed due to exception=" + e);
+    } finally {
+      IndexManager.TEST_RANGEINDEX_ONLY = false;
+      isInitDone = false;
+      CacheUtils.restartCache();
+    }
+  }
+
+  /**
+   * Test to acquire range and compact index.
+   */
+  @Test
+  public void testToAcquireCompactRangeIndexEarly() {

Review comment:
       This test isn't asserting anything so it's not really possible for it to fail. It should probably just be removed.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@geode.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [geode] dkhopade commented on pull request #6757: GEODE-1505: merged 2 classes. moved the tests from incorrectly spelled test class

Posted by GitBox <gi...@apache.org>.
dkhopade commented on pull request #6757:
URL: https://github.com/apache/geode/pull/6757#issuecomment-901922388


   Alright, so even after re-running the task "concourse-ci/distributed-test-openjdk8" via an empty commit, it's still failing, so not sure if we are ok with this to still get the PR approved. 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@geode.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [geode] dkhopade commented on pull request #6757: GEODE-1505: merged 2 classes. moved the tests from incorrectly spelled test class

Posted by GitBox <gi...@apache.org>.
dkhopade commented on pull request #6757:
URL: https://github.com/apache/geode/pull/6757#issuecomment-904248784


   @DonalEvans, you are great. I was about to start reviewing and thinking of new names 👍 . You made my life easy. 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@geode.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [geode] dkhopade commented on pull request #6757: GEODE-1505: merged 2 classes. moved the tests from incorrectly spelled test class

Posted by GitBox <gi...@apache.org>.
dkhopade commented on pull request #6757:
URL: https://github.com/apache/geode/pull/6757#issuecomment-901127311


   @DonalEvans, I have committed the changes that triggered the build actions, but this one CI "concourse-ci/distributed-test-openjdk8" is failing. Do you have any idea how to restart that or what could be wrong? 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@geode.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [geode] dkhopade commented on pull request #6757: GEODE-1505: merged 2 classes. moved the tests from incorrectly spelled test class

Posted by GitBox <gi...@apache.org>.
dkhopade commented on pull request #6757:
URL: https://github.com/apache/geode/pull/6757#issuecomment-904157308


   ![Screen Shot 2021-08-23 at 5 49 14 PM](https://user-images.githubusercontent.com/10272355/130524027-5202c470-7971-45c7-847c-92d72fcf6c95.png)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@geode.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [geode] DonalEvans commented on pull request #6757: GEODE-1505: merged 2 classes. moved the tests from incorrectly spelled test class

Posted by GitBox <gi...@apache.org>.
DonalEvans commented on pull request #6757:
URL: https://github.com/apache/geode/pull/6757#issuecomment-904825949


   > @DonalEvans, I was reviewing this test and couldnt really understand what it does in terms of index. Any idea? https://github.com/apache/geode/pull/6757/files/6179b2b43cceb5de895d174d7ec66ecb99f9bb79#R1052
   
   @dkhopade That link doesn't seem to be working properly; which test were you referring to? The PR looks fine now though, so I'm happy to approve it.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@geode.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [geode] dkhopade commented on pull request #6757: GEODE-1505: merged 2 classes. moved the tests from incorrectly spelled test class

Posted by GitBox <gi...@apache.org>.
dkhopade commented on pull request #6757:
URL: https://github.com/apache/geode/pull/6757#issuecomment-896800412


   Thanks @mkevo for your reviews. I had the `gradlew build` already executed before submitting the PR. However, thanks for the other command `gradlew spotlessApply`. All looking good with both. Also have changed the title of the PR to follow the standard.
   
   ![Screen Shot 2021-08-11 at 8 52 08 AM](https://user-images.githubusercontent.com/10272355/129031805-ec99de34-24b9-4dca-8da2-54ce238fa871.png)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@geode.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [geode] DonalEvans commented on pull request #6757: GEODE-1505: merged 2 classes. moved the tests from incorrectly spelled test class

Posted by GitBox <gi...@apache.org>.
DonalEvans commented on pull request #6757:
URL: https://github.com/apache/geode/pull/6757#issuecomment-900595283


   > I agree @DonalEvans and thanks for your review comments. I am on it :).
   
   The changes in the most recent commit don't really address the issue I'm afraid. The test names should be made more descriptive to make it clear what behaviour is under test. Simply removing the "003", "004" etc. doesn't achieve this. A good guide for how to write descriptive test names and why doing so is helpful can be found here: https://osherove.com/blog/2005/4/3/naming-standards-for-unit-tests.html


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@geode.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [geode] mkevo commented on pull request #6757: GEODE-1505: merged 2 classes. moved the tests from incorrectly spelled test class

Posted by GitBox <gi...@apache.org>.
mkevo commented on pull request #6757:
URL: https://github.com/apache/geode/pull/6757#issuecomment-896804421


   The build passed because everything is okay in productive code and in unit tests. But your fault is in integration tests which are not ran with gradlew build. So you can try to do gradlew spotlessApply and then with git status check modified files and add them in a new commit.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@geode.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [geode] DonalEvans commented on pull request #6757: GEODE-1505: merged 2 classes. moved the tests from incorrectly spelled test class

Posted by GitBox <gi...@apache.org>.
DonalEvans commented on pull request #6757:
URL: https://github.com/apache/geode/pull/6757#issuecomment-900595283






-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@geode.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [geode] dkhopade commented on pull request #6757: GEODE-1505: merged 2 classes. moved the tests from incorrectly spelled test class

Posted by GitBox <gi...@apache.org>.
dkhopade commented on pull request #6757:
URL: https://github.com/apache/geode/pull/6757#issuecomment-904586715


   This is magic, the test "concourse-ci/acceptance-test-openjdk11" passed this time without any changes :)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@geode.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [geode] dkhopade commented on pull request #6757: GEODE-1505: merged 2 classes. moved the tests from incorrectly spelled test class

Posted by GitBox <gi...@apache.org>.
dkhopade commented on pull request #6757:
URL: https://github.com/apache/geode/pull/6757#issuecomment-896824070


   Absolutely, I noticed how it cleaned the whitespaces :) and I agree, it has to build for sure no matter what changes are applied to the file. Thanks once again.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@geode.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [geode] DonalEvans commented on pull request #6757: GEODE-1505: merged 2 classes. moved the tests from incorrectly spelled test class

Posted by GitBox <gi...@apache.org>.
DonalEvans commented on pull request #6757:
URL: https://github.com/apache/geode/pull/6757#issuecomment-904907879


   > @DonalEvans thank you so much. And this is the test i as referring to:
   > 
   > https://github.com/apache/geode/blob/64f865415db977c384efb93e799a4d4c619344a2/geode-core/src/integrationTest/java/org/apache/geode/cache/query/internal/index/IndexMaintenanceJUnitTest.java#L1052
   
   I see, thanks for the clarification. It definitely seems like a lot of the tests in this class could do with being refactored and renamed, but that's outside the scope of the ticket, I think. Especially without access to the old bug tracking system that describes what "bug43597" actually is, I wouldn't be confident in changing or removing this. If you're happy with the changes as they are, I can merge this for you.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@geode.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [geode] dkhopade commented on pull request #6757: GEODE-1505: merged 2 classes. moved the tests from incorrectly spelled test class

Posted by GitBox <gi...@apache.org>.
dkhopade commented on pull request #6757:
URL: https://github.com/apache/geode/pull/6757#issuecomment-904156856


   Thanks, @DonalEvans again and I agree, I only removed the numbers. Honestly, I need to understand more to come up with a good name for these tests. My original intention was to get rid of the old test class and move the tests from there to the more appropriate test class when I started. But no worries, I am on changing them to meaningful ones :).
   
   About the test that is failing is as per https://issues.apache.org/jira/browse/GEODE-8411 so we can ignore that. Let me know your thoughts. 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@geode.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [geode] DonalEvans commented on pull request #6757: GEODE-1505: merged 2 classes. moved the tests from incorrectly spelled test class

Posted by GitBox <gi...@apache.org>.
DonalEvans commented on pull request #6757:
URL: https://github.com/apache/geode/pull/6757#issuecomment-902018065


   > Alright, so even after re-running the task "concourse-ci/distributed-test-openjdk8" via an empty commit, it's still failing, so not sure if we are ok with this to still get the PR approved.
   
   It's (sadly) pretty normal for there to be a flaky failure in the pre-checkin, so as long as it's been confirmed that the cause of the job failing is a known issue (the most recent one seems to be [GEODE-8411](https://issues.apache.org/jira/browse/GEODE-8411)), it's fine to merge the PR. It's often helpful for reviewers if you can identify the cause of the flaky failure and leave a comment saying what it is, so they know it's nothing to worry about.
   
   That being said, I would appreciate it if you could address [this comment](https://github.com/apache/geode/pull/6757#issuecomment-900595283) to update the test names to be more descriptive before this gets merged.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@geode.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [geode] dkhopade commented on pull request #6757: GEODE-1505: merged 2 classes. moved the tests from incorrectly spelled test class

Posted by GitBox <gi...@apache.org>.
dkhopade commented on pull request #6757:
URL: https://github.com/apache/geode/pull/6757#issuecomment-904850028


   @DonalEvans thank you so much. And this is the test i as referring to: https://github.com/apache/geode/blob/64f865415db977c384efb93e799a4d4c619344a2/geode-core/src/integrationTest/java/org/apache/geode/cache/query/internal/index/IndexMaintenanceJUnitTest.java#L1052


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@geode.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [geode] dkhopade commented on pull request #6757: GEODE-1505: merged 2 classes. moved the tests from incorrectly spelled test class

Posted by GitBox <gi...@apache.org>.
dkhopade commented on pull request #6757:
URL: https://github.com/apache/geode/pull/6757#issuecomment-901840434


   Thanks again @DonalEvans for your comments and clarifications on required vs. optional. I did open the task CI earlier and was able to see what step is failing, however, had no ability to restart it. Never mind, I was thinking of a commit to trigger the build and eventually run tests. Let me do that now. 
   
   And yes, I would love to see Green PR 😄  🤞 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@geode.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org