Uploaded image for project: 'Red Hat Data Grid'
  1. Red Hat Data Grid
  2. JDG-1044

Conditional remove doesn't work with storeAsBinary

    XMLWordPrintable

Details

    • Bug
    • Status: Verified (View Workflow)
    • Major
    • Resolution: Done
    • JDG 7.1.0 GA
    • JDG 7.1.1 ER1
    • Library
    • None
    • ER1
    • Hide
        public void testConditionalRemoveWithStoreAsBinary() {
            ConfigurationBuilder c = new ConfigurationBuilder();
            c.storeAsBinary().enable().storeKeysAsBinary(true).storeValuesAsBinary(true).build();
            ecm = TestCacheManagerFactory.createCacheManager(c);
            Cache<Object, Object> cache = ecm.getCache();
            cache.put(key, value);
            cache.remove(key, value);
            assert cache.get(key) == null;
         }
      
      Show
      public void testConditionalRemoveWithStoreAsBinary() { ConfigurationBuilder c = new ConfigurationBuilder(); c.storeAsBinary().enable().storeKeysAsBinary( true ).storeValuesAsBinary( true ).build(); ecm = TestCacheManagerFactory.createCacheManager(c); Cache< Object , Object > cache = ecm.getCache(); cache.put(key, value); cache.remove(key, value); assert cache.get(key) == null ; }

    Description

      See attached reproducer. The conditional RemoveCommand fails since the stored value is a MarshalledValue and doesn't match the passed in unmarshalled value.

      Attachments

        Issue Links

          Activity

            People

              gfernand@redhat.com Gustavo Fernandes (Inactive)
              gfernand@redhat.com Gustavo Fernandes (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: