Uploaded image for project: 'Geode'
  1. Geode
  2. GEODE-7665 Ability to clear a Partitioned Region
  3. GEODE-8771

concurrent puts and invalidates will cause PR clear to hang

    XMLWordPrintableJSON

    Details

      Description

      On current feature/GEODE-7665 feature branch. The below test will hang:

      public class PRClearIntegrationTest {

      @Rule
      public ServerStarterRule server = new ServerStarterRule().withAutoStart();

      @Rule
      public ExecutorServiceRule executor = new ExecutorServiceRule();

      @Test
      public void test() throws Exception {
      InternalCache cache = server.getCache();
      Region<Object, Object> region = server.createPartitionRegion("regionA", f->{}, f->f.setTotalNumBuckets(1));
      cache.getQueryService().createIndex("indexA", "r", "/regionA r");
      region.put(0, "value0");

      CompletableFuture<Void> put = executor.runAsync(() ->

      Unknown macro: { Thread.currentThread().setName("put-Thread"); IntStream.range(0, 1).forEach(i-> region.invalidate(i, i)); }

      );
      CompletableFuture<Void> invalidate = executor.runAsync(() ->

      Unknown macro: { Thread.currentThread().setName("invalidate-Thread"); IntStream.range(0, 1).forEach(i-> region.invalidate(0)); }

      );
      CompletableFuture<Void> clear = executor.runAsync(() ->

      Unknown macro: { Thread.currentThread().setName("Clear-Thread"); region.clear(); }

      );
      put.get();
      clear.get();
      invalidate.get();
      }
      }

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                jinmeiliao Jinmei Liao
                Reporter:
                jinmeiliao Jinmei Liao
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: