1 Reply Latest reply: Dec 12, 2013 7:36 AM by user639604 RSS

    very strange, Entry Processor block the entire coherence node

    user8028188

      I have a client node(storage= false) client1 which continues do get from cache1, the code is below:

      for(int i=0;i<10000000;i++){

                  System.out.println("get:"+ cache1.get(i));

          }

       

      and have another client node(storage= false) client2 which invoke a Entry Processor. this Entry Processor is work on cache2(not cache1)

      cache2.invoke(keys,new MyEntryProcessor());

       

      the MyEntryProcessor code is as below:

      public Object process(Entry entry) {

              for(int i=0;i< 1000000;i++){

                  entry.getKey();

                  entry.getValue();

                  System.out.println(i);

              }

              return null;

          }

      when client2 begin run,  client1 will be blocked, until client2's Entry Processor is finished.

      who can tell me why. it's very strange, because client1 and client2 are work on two different cache. and it's only do get

        • 1. Re: very strange, Entry Processor block the entire coherence node
          user639604

          If these two caches belong to same cache service, then their requests are handled by the same service thread.   Coherence only use single service thread per service per node.    So if the get() for cache1 and the entry processor for cache2 go to the same node, you will see that behavior if cache1 and cache2 belong to same cache service.

           

          Either turn on thread pool (if you want to use same cache service( or use different cache service.