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

State transfer must be enabled for Lucene Directory if clustered caches are used

This issue belongs to an archived project. You can view it, but you can't modify it. Learn more

XMLWordPrintable

      take a look at the following code:

      public Set<String> getFileList() {
            Set<String> fileList = (Set<String>) cache.get(fileListCacheKey);
            if (fileList == null) {
               fileList = new ConcurrentHashSet<String>();
               Set<String> prev = (Set<String>) cache.putIfAbsent(fileListCacheKey, fileList);
              if ( prev != null ) {
                  fileList = prev;
               }
            }
            return fileList;
         }
      

      when it requests the file list, the joiner does not have the data locally and it tries to do a putIfAbsent with an empty set. However, when it reaches the primary owner (if not changed), it will return the current file list.
      After, it tries to read the files returned in the set and it cannot find it, throwing an IOException – "Read past EOF"

      A validation should be made in order to not allow clustered caches without state transfer.

              pruivo@redhat.com Pedro Ruivo
              pruivo@redhat.com Pedro Ruivo
              Archiver:
              rhn-support-adongare Amol Dongare

                Created:
                Updated:
                Resolved:
                Archived: