mirror of
https://github.com/Alfresco/SearchServices.git
synced 2025-09-17 14:21:20 +00:00
[SEARCH-1994]
workaroung for open contentstore file descriptors in windows os
This commit is contained in:
@@ -49,6 +49,7 @@ import java.util.List;
|
||||
import java.util.Locale;
|
||||
import java.util.Map;
|
||||
import java.util.function.Predicate;
|
||||
import java.util.stream.Stream;
|
||||
import java.util.zip.GZIPInputStream;
|
||||
import java.util.zip.GZIPOutputStream;
|
||||
|
||||
@@ -234,10 +235,9 @@ public final class SolrContentStore implements Closeable, AccessMode
|
||||
@Override
|
||||
public long getLastCommittedVersion()
|
||||
{
|
||||
try
|
||||
try(Stream<String> fileStream = Files.lines(Paths.get(root, ".version")) )
|
||||
{
|
||||
return Files.lines(Paths.get(root, ".version"))
|
||||
.map(Long::parseLong)
|
||||
return fileStream.map(Long::parseLong)
|
||||
.findFirst()
|
||||
.orElse(NO_VERSION_AVAILABLE);
|
||||
}
|
||||
|
@@ -467,6 +467,8 @@ class AlfrescoIndexFetcher
|
||||
Map<String, List<Map<String, Object>>> contentStoreMap = (Map<String, List<Map<String, Object>>>) response
|
||||
.get(CONTENT_STORE_FILES);
|
||||
|
||||
fullContentStoreReplication = false;
|
||||
|
||||
if (contentStoreMap != null)
|
||||
{
|
||||
contentStoreFilesToDownload = Collections.synchronizedList(contentStoreMap.get(SolrContentStore.ADDS));
|
||||
|
@@ -2122,6 +2122,7 @@ public class AlfrescoReplicationHandler extends RequestHandlerBase implements So
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
@@ -2169,6 +2170,7 @@ public class AlfrescoReplicationHandler extends RequestHandlerBase implements So
|
||||
if (bytesRead <= 0)
|
||||
{
|
||||
writeNothingAndFlush();
|
||||
inputStream.close();
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -2185,6 +2187,7 @@ public class AlfrescoReplicationHandler extends RequestHandlerBase implements So
|
||||
fos.flush();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user