Uploaded image for project: 'Ignite'
  1. Ignite
  2. IGNITE-7330

When client connects during cluster activation process it hangs on obtaining cache proxy

Log workAgile BoardRank to TopRank to BottomAttach filesAttach ScreenshotBulk Copy AttachmentsBulk Move AttachmentsVotersWatch issueWatchersCreate sub-taskConvert to sub-taskLinkCloneLabelsUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Critical
    • Resolution: Cannot Reproduce
    • None
    • None
    • None

    Description

      The test below reproduces the issue:

          public void testClientJoinWhenActivationInProgress() throws Exception {
              Ignite srv = startGrids(5);
      
              srv.active(true);
      
              srv.createCaches(Arrays.asList(cacheConfigurations1()));
      
              Map<Integer, Integer> cacheData = new LinkedHashMap<>();
      
              for (int i = 1; i <= 100; i++) {
                  for (CacheConfiguration ccfg : cacheConfigurations1()) {
                      srv.cache(ccfg.getName()).put(-i, i);
      
                      cacheData.put(-i, i);
                  }
              }
      
              stopAllGrids();
      
              srv = startGrids(5);
      
              final CountDownLatch clientStartLatch = new CountDownLatch(1);
      
              IgniteInternalFuture clStartFut = GridTestUtils.runAsync(new Runnable() {
                  @Override public void run() {
                      try {
                          clientStartLatch.await();
      
                          Thread.sleep(10);
      
                          client = true;
      
                          Ignite cl = startGrid("client0");
      
                          IgniteCache<Object, Object> atomicCache = cl.cache(CACHE_NAME_PREFIX + '0');
                          IgniteCache<Object, Object> txCache = cl.cache(CACHE_NAME_PREFIX + '1');
      
                          assertEquals(100, atomicCache.size());
                          assertEquals(100, txCache.size());
                      }
                      catch (Exception e) {
                          log.error("Error occurred", e);
                      }
                  }
              }, "client-starter-thread");
      
              clientStartLatch.countDown();
              srv.active(true);
      
              clStartFut.get();
          }
      

      Expected behavior: test finishes successfully.

      Actual behavior: test hangs on waiting for client start future to complete while "client-started-thread" will be hanging on obtaining a reference to the first cache.

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            Unassigned Unassigned Assign to me
            sergey-chugunov Sergey Chugunov
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment