Uploaded image for project: 'Geode'
  1. Geode
  2. GEODE-10191

BLPOP command does not trigger when the target List is created via a RENAME

    XMLWordPrintableJSON

Details

    Description

      BLPOP uses fired events from the LPUSH and RPUSH commands to trigger returning, but it is also possible that a key will be created via RENAME, which does not currently fire any events. The test below passes with open source Redis but fails/hangs with geode-for-redis:

      @Test
      public void testBLPopWhenValueGetsCreated_withRename() throws Exception {
        String initialName = "{tag}initial";
        String changedName = "{tag}changed";
        jedis.lpush(initialName, "value1", "value2");
        Future<List<String>> future = executor.submit(() -> jedis.blpop(0, changedName));
      
        awaitEventDistributorSize(1);
        jedis.rename(initialName, changedName);
      
        assertThat(future.get()).containsExactly(changedName, "value2");
        assertThat(jedis.lpop(changedName)).isEqualTo("value1");
      } 

      The RENAME command should be modified so that it fires events for the key being created.

      Attachments

        Issue Links

          Activity

            People

              jens.deppe Jens Deppe
              donalevans Donal Evans
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: