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

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

    Details

      Description

      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.

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                pruivo Pedro Ruivo
                Reporter:
                pruivo Pedro Ruivo
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: