Uploaded image for project: 'Infinispan'
  1. Infinispan
  2. ISPN-5677

HR putIfAbsentAsync not enforcing withFlags(Flag.FORCE_RETURN_VALUE)

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 8.0.0.CR1, 8.0.0.Final, 7.2.5.Final
    • 6.0.2.Final
    • None
    • None

      given the following HR client code

      NotifyingFuture<String> f1 = cache.withFlags(Flag.FORCE_RETURN_VALUE).putIfAbsentAsync(key, "1");
      System.out.println(f1.get(10,TimeUnit.MINUTES));
      NotifyingFuture<String> f2 = cache.withFlags(Flag.FORCE_RETURN_VALUE).putIfAbsentAsync(key, "2");
      System.out.println(f2.get(10,TimeUnit.MINUTES));

      both prints print null, where the second one should print "1"

      only when props.put("infinispan.client.hotrod.force_return_values","true") is set specifically when building the CM then the calls work

              gfernand@redhat.com Gustavo Fernandes (Inactive)
              rhn-support-smatasar Shay Matasaro (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: