@Override
          public void run2() throws CacheException {
            Cache cache = getCache();
            Region partitionRegion = null;
            IndexManager.testHook = null;
            try {
              AttributesFactory attr = new AttributesFactory();
              attr.setValueConstraint(PortfolioData.class);
              attr.setIndexMaintenanceSynchronous(true);
              attr.setDataPolicy(DataPolicy.PARTITION);
              attr.setPartitionAttributes(
                  new PartitionAttributesFactory().setTotalNumBuckets(1).create());
              RegionFactory regionFactory = cache.createRegionFactory(attr.create());
              partitionRegion = regionFactory.create(name);
            } catch (IllegalStateException ex) {
              LogWriterUtils.getLogWriter().warning("Creation caught IllegalStateException", ex);
            }
            assertNotNull("Region " + name + " not in cache", cache.getRegion(name));
            assertNotNull("Region ref null", partitionRegion);
            assertTrue("Region ref claims to be destroyed", !partitionRegion.isDestroyed());
            // Create Indexes
            try {
              Index index =
                  cache.getQueryService().createIndex("statusIndex", "p.ID",
                      SEPARATOR + name + " p");
              assertNotNull(index);
            } catch (Exception e1) {
              e1.printStackTrace();
              fail("Index creation failed");
            }
          }
Test creates a persistent-overflow region and performs updates in region which has compact
indexes and queries the indexes simultaneously.

This test's main purpose is to look for deadlock problems caused by NOT taking early locks on
compact indexes and remove the requirement of the system property
gemfire.index.acquireCompactIndexLocksWithRegionEntryLocks.
geode-core/src/distributedTest/java/org/apache/geode/cache/query/internal/index/ConcurrentIndexOperationsOnOverflowRegionDUnitTest.java