[infinispan-issues] [JBoss JIRA] (ISPN-10345) PutAll to register proto files hangs

Gustavo Fernandes (Jira) issues at jboss.org
Mon Jun 24 05:47:00 EDT 2019


Gustavo Fernandes created ISPN-10345:
----------------------------------------

             Summary: PutAll to register proto files hangs
                 Key: ISPN-10345
                 URL: https://issues.jboss.org/browse/ISPN-10345
             Project: Infinispan
          Issue Type: Feature Request
          Components: Core, Remote Querying
    Affects Versions: 9.4.15.Final
            Reporter: Gustavo Fernandes


PutAll to register protofiles causes the operation to fail with timeout. Simple reproducer:

{code:java}
package org.infinispan.client.hotrod;

import static org.infinispan.query.remote.client.ProtobufMetadataManagerConstants.PROTOBUF_METADATA_CACHE_NAME;
import static org.infinispan.server.hotrod.test.HotRodTestingUtil.hotRodCacheConfiguration;
import static org.testng.AssertJUnit.assertEquals;

import java.util.HashMap;
import java.util.Map;

import org.infinispan.client.hotrod.test.MultiHotRodServersTest;
import org.infinispan.configuration.cache.CacheMode;
import org.infinispan.configuration.cache.ConfigurationBuilder;
import org.testng.annotations.Test;

@Test(groups = "functional", testName = "client.hotrod.PutAllProtoRegistration")
public class PutAllProtoRegistration extends MultiHotRodServersTest {

   private static final int CLUSTER_SIZE = 2;

   @Override
   protected void createCacheManagers() throws Throwable {
      ConfigurationBuilder cfgBuilder = hotRodCacheConfiguration(getDefaultClusteredCacheConfig(CacheMode.DIST_SYNC, false));
      createHotRodServers(CLUSTER_SIZE, cfgBuilder);
      waitForClusterToForm();
   }

   @Test
   public void testBatchProtoRegistration() {
      String protoName = "test.proto";
      String protoValue = "message Test {}";
      Map<String, String> value = new HashMap<>();
      value.put(protoName, protoValue);

      RemoteCache<String, String> metadataCache = client(0).getCache(PROTOBUF_METADATA_CACHE_NAME);

      metadataCache.putAll(value);

      assertEquals(metadataCache.get(protoName), protoValue);
   }

}
{code}


The test passes with CLUSTER_SIZE = 1



--
This message was sent by Atlassian Jira
(v7.12.1#712002)


More information about the infinispan-issues mailing list