Compare commits
35
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e626bf836b | ||
|
|
c759418793 | ||
|
|
9e6a9582f3 | ||
|
|
654b5609b3 | ||
|
|
ab10938911 | ||
|
|
3212c47967 | ||
|
|
ff068d8d3f | ||
|
|
354ea3f337 | ||
|
|
b737bccd1c | ||
|
|
ed97efb4ed | ||
|
|
b6bae65e03 | ||
|
|
fe95ff6239 | ||
|
|
a1144fcad4 | ||
|
|
299be529ba | ||
|
|
ff331cac48 | ||
|
|
d86c96fcb1 | ||
|
|
933a786038 | ||
|
|
bb183c5e50 | ||
|
|
f909f3429b | ||
|
|
fe2eaa0588 | ||
|
|
68471be9ef | ||
|
|
82410805db | ||
|
|
ceb8d2c690 | ||
|
|
1c15853652 | ||
|
|
cf1bc8d2be | ||
|
|
a49ddbd373 | ||
|
|
738e5b98f8 | ||
|
|
9d9d17c49b | ||
|
|
43109e7d9c | ||
|
|
dcb37c3dc8 | ||
|
|
68ffb56cc9 | ||
|
|
dc436e9ce0 | ||
|
|
18c39b0fc5 | ||
|
|
b7aa615103 | ||
|
|
e8f133b873 |
+5
-5
@@ -6,12 +6,12 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.inteligr8.alfresco</groupId>
|
<groupId>com.inteligr8.alfresco</groupId>
|
||||||
<artifactId>asie-platform-module-parent</artifactId>
|
<artifactId>asie-platform-module-parent</artifactId>
|
||||||
<version>1.3-SNAPSHOT</version>
|
<version>1.3.6</version>
|
||||||
<relativePath>../</relativePath>
|
<relativePath>../</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<artifactId>asie-api</artifactId>
|
<artifactId>asie-api</artifactId>
|
||||||
<version>1.2-SNAPSHOT-asie2</version>
|
<version>1.1.2-asie2</version>
|
||||||
<packaging>jar</packaging>
|
<packaging>jar</packaging>
|
||||||
|
|
||||||
<name>ASIE Jakarta RS API</name>
|
<name>ASIE Jakarta RS API</name>
|
||||||
@@ -33,7 +33,7 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.inteligr8</groupId>
|
<groupId>com.inteligr8</groupId>
|
||||||
<artifactId>solr-api</artifactId>
|
<artifactId>solr-api</artifactId>
|
||||||
<version>1.2-SNAPSHOT-solr6</version>
|
<version>1.1.0-solr6</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.alfresco</groupId>
|
<groupId>org.alfresco</groupId>
|
||||||
@@ -53,7 +53,7 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.glassfish.jersey.inject</groupId>
|
<groupId>org.glassfish.jersey.inject</groupId>
|
||||||
<artifactId>jersey-hk2</artifactId>
|
<artifactId>jersey-hk2</artifactId>
|
||||||
<version>4.0.2</version>
|
<version>3.1.10</version>
|
||||||
<scope>test</scope>
|
<scope>test</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
@@ -84,7 +84,7 @@
|
|||||||
<repositories>
|
<repositories>
|
||||||
<repository>
|
<repository>
|
||||||
<id>alfresco-public</id>
|
<id>alfresco-public</id>
|
||||||
<url>https://artifacts.alfresco.com/nexus/repository/releases/</url>
|
<url>https://artifacts.alfresco.com/nexus/repository/public/</url>
|
||||||
</repository>
|
</repository>
|
||||||
</repositories>
|
</repositories>
|
||||||
</project>
|
</project>
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.inteligr8.alfresco</groupId>
|
<groupId>com.inteligr8.alfresco</groupId>
|
||||||
<artifactId>asie-platform-module-parent</artifactId>
|
<artifactId>asie-platform-module-parent</artifactId>
|
||||||
<version>1.3-SNAPSHOT</version>
|
<version>1.2.2</version>
|
||||||
<relativePath>../</relativePath>
|
<relativePath>../</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
@@ -16,10 +16,10 @@
|
|||||||
<name>ASIE Platform Module for ACS Community</name>
|
<name>ASIE Platform Module for ACS Community</name>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
<alfresco.sdk.version>4.16.0</alfresco.sdk.version>
|
<alfresco.sdk.version>4.9.0</alfresco.sdk.version>
|
||||||
<alfresco.platform.version>26.1.0</alfresco.platform.version>
|
<alfresco.platform.version>23.3.0</alfresco.platform.version>
|
||||||
<alfresco.platform.war.version>26.1.0.61</alfresco.platform.war.version>
|
<alfresco.platform.war.version>23.3.0.98</alfresco.platform.war.version>
|
||||||
<tomcat-rad.version>2.3-tomcat-11.0.22</tomcat-rad.version>
|
<tomcat-rad.version>10-2.1</tomcat-rad.version>
|
||||||
|
|
||||||
<beedk.rad.acs-search.enabled>true</beedk.rad.acs-search.enabled>
|
<beedk.rad.acs-search.enabled>true</beedk.rad.acs-search.enabled>
|
||||||
</properties>
|
</properties>
|
||||||
@@ -59,7 +59,7 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.inteligr8.alfresco</groupId>
|
<groupId>com.inteligr8.alfresco</groupId>
|
||||||
<artifactId>cxf-jaxrs-platform-module</artifactId>
|
<artifactId>cxf-jaxrs-platform-module</artifactId>
|
||||||
<version>1.4.0-acs-v26.1</version>
|
<version>1.3.1-acs-v23.3</version>
|
||||||
<type>amp</type>
|
<type>amp</type>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
@@ -81,6 +81,7 @@
|
|||||||
<plugin>
|
<plugin>
|
||||||
<groupId>io.repaint.maven</groupId>
|
<groupId>io.repaint.maven</groupId>
|
||||||
<artifactId>tiles-maven-plugin</artifactId>
|
<artifactId>tiles-maven-plugin</artifactId>
|
||||||
|
<version>2.40</version>
|
||||||
<extensions>true</extensions>
|
<extensions>true</extensions>
|
||||||
<configuration>
|
<configuration>
|
||||||
<tiles>
|
<tiles>
|
||||||
@@ -99,7 +100,7 @@
|
|||||||
<repositories>
|
<repositories>
|
||||||
<repository>
|
<repository>
|
||||||
<id>alfresco-public</id>
|
<id>alfresco-public</id>
|
||||||
<url>https://artifacts.alfresco.com/nexus/repository/releases/</url>
|
<url>https://artifacts.alfresco.com/nexus/content/groups/public</url>
|
||||||
</repository>
|
</repository>
|
||||||
</repositories>
|
</repositories>
|
||||||
</project>
|
</project>
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.inteligr8.alfresco</groupId>
|
<groupId>com.inteligr8.alfresco</groupId>
|
||||||
<artifactId>asie-platform-module-parent</artifactId>
|
<artifactId>asie-platform-module-parent</artifactId>
|
||||||
<version>1.3-SNAPSHOT</version>
|
<version>1.3.6</version>
|
||||||
<relativePath>../</relativePath>
|
<relativePath>../</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
@@ -16,10 +16,9 @@
|
|||||||
<name>ASIE Platform Module for ACS Enterprise</name>
|
<name>ASIE Platform Module for ACS Enterprise</name>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
<alfresco.platform.version>26.1.0</alfresco.platform.version>
|
<alfresco.platform.version>25.1.0</alfresco.platform.version>
|
||||||
<alfresco.platform.war.version>26.1.0.61</alfresco.platform.war.version>
|
<alfresco.platform.war.version>25.1.0.71</alfresco.platform.war.version>
|
||||||
<tomcat-rad.version>2.3-tomcat-11.0.22</tomcat-rad.version>
|
<tomcat-rad.version>2.3-tomcat-10.1.52</tomcat-rad.version>
|
||||||
<jackson.version>2.17.2</jackson.version>
|
|
||||||
|
|
||||||
<beedk.rad.acs-search.enabled>true</beedk.rad.acs-search.enabled>
|
<beedk.rad.acs-search.enabled>true</beedk.rad.acs-search.enabled>
|
||||||
</properties>
|
</properties>
|
||||||
@@ -41,7 +40,7 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.inteligr8.alfresco</groupId>
|
<groupId>com.inteligr8.alfresco</groupId>
|
||||||
<artifactId>cxf-jaxrs-platform-module</artifactId>
|
<artifactId>cxf-jaxrs-platform-module</artifactId>
|
||||||
<version>1.4.0-acs-v26.1</version>
|
<version>1.4.0-acs-v25.1</version>
|
||||||
<type>amp</type>
|
<type>amp</type>
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
@@ -75,13 +74,13 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.fasterxml.jackson.datatype</groupId>
|
<groupId>com.fasterxml.jackson.datatype</groupId>
|
||||||
<artifactId>jackson-datatype-jsr310</artifactId>
|
<artifactId>jackson-datatype-jsr310</artifactId>
|
||||||
<version>${jackson.version}</version>
|
<version>2.17.3</version>
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.fasterxml.jackson.module</groupId>
|
<groupId>com.fasterxml.jackson.module</groupId>
|
||||||
<artifactId>jackson-module-jakarta-xmlbind-annotations</artifactId>
|
<artifactId>jackson-module-jakarta-xmlbind-annotations</artifactId>
|
||||||
<version>${jackson.version}</version>
|
<version>2.17.2</version>
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -264,7 +264,7 @@ public class ShardDiscoveryService implements com.inteligr8.alfresco.asie.spi.Sh
|
|||||||
ShardInstanceState nodeShardState = ShardInstanceState.from(shardState);
|
ShardInstanceState nodeShardState = ShardInstanceState.from(shardState);
|
||||||
|
|
||||||
Pair<SolrHost, ShardInstanceState> pair = new Pair<>(node, nodeShardState);
|
Pair<SolrHost, ShardInstanceState> pair = new Pair<>(node, nodeShardState);
|
||||||
if (!shardNodeStates.containsKey(shardId) || comparator.compare(pair, shardNodeStates.get(shardId)) < 0)
|
if (comparator.compare(pair, shardNodeStates.get(shardId)) < 0)
|
||||||
shardNodeStates.put(shardId, pair);
|
shardNodeStates.put(shardId, pair);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
<groupId>com.inteligr8.alfresco</groupId>
|
<groupId>com.inteligr8.alfresco</groupId>
|
||||||
<artifactId>asie-platform-module-parent</artifactId>
|
<artifactId>asie-platform-module-parent</artifactId>
|
||||||
<version>1.3-SNAPSHOT</version>
|
<version>1.3.6</version>
|
||||||
<packaging>pom</packaging>
|
<packaging>pom</packaging>
|
||||||
|
|
||||||
<name>ASIE Platform Module Parent</name>
|
<name>ASIE Platform Module Parent</name>
|
||||||
@@ -47,9 +47,9 @@
|
|||||||
<!-- must be aligned with the target ACS platform junit -->
|
<!-- must be aligned with the target ACS platform junit -->
|
||||||
<junit.version>5.12.2</junit.version>
|
<junit.version>5.12.2</junit.version>
|
||||||
|
|
||||||
<commom-rest-client.base.version>3.0.4</commom-rest-client.base.version>
|
<commom-rest-client.base.version>3.0.3</commom-rest-client.base.version>
|
||||||
|
|
||||||
<alfresco.platform.version>26.1.0</alfresco.platform.version>
|
<alfresco.platform.version>25.1.0</alfresco.platform.version>
|
||||||
</properties>
|
</properties>
|
||||||
|
|
||||||
<dependencyManagement>
|
<dependencyManagement>
|
||||||
@@ -68,7 +68,7 @@
|
|||||||
<!-- helps avoid vulnerable dependencies -->
|
<!-- helps avoid vulnerable dependencies -->
|
||||||
<plugin>
|
<plugin>
|
||||||
<artifactId>maven-site-plugin</artifactId>
|
<artifactId>maven-site-plugin</artifactId>
|
||||||
<version>3.22.0</version>
|
<version>3.21.0</version>
|
||||||
</plugin>
|
</plugin>
|
||||||
<plugin>
|
<plugin>
|
||||||
<artifactId>maven-compiler-plugin</artifactId>
|
<artifactId>maven-compiler-plugin</artifactId>
|
||||||
@@ -76,12 +76,12 @@
|
|||||||
</plugin>
|
</plugin>
|
||||||
<plugin>
|
<plugin>
|
||||||
<artifactId>maven-dependency-plugin</artifactId>
|
<artifactId>maven-dependency-plugin</artifactId>
|
||||||
<version>3.11.0</version>
|
<version>3.10.0</version>
|
||||||
</plugin>
|
</plugin>
|
||||||
|
|
||||||
<plugin>
|
<plugin>
|
||||||
<artifactId>maven-surefire-plugin</artifactId>
|
<artifactId>maven-surefire-plugin</artifactId>
|
||||||
<version>3.5.6</version>
|
<version>3.5.5</version>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.junit.jupiter</groupId>
|
<groupId>org.junit.jupiter</groupId>
|
||||||
@@ -92,7 +92,7 @@
|
|||||||
</plugin>
|
</plugin>
|
||||||
<plugin>
|
<plugin>
|
||||||
<artifactId>maven-failsafe-plugin</artifactId>
|
<artifactId>maven-failsafe-plugin</artifactId>
|
||||||
<version>3.5.6</version>
|
<version>3.5.5</version>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.junit.jupiter</groupId>
|
<groupId>org.junit.jupiter</groupId>
|
||||||
@@ -105,7 +105,7 @@
|
|||||||
<plugin>
|
<plugin>
|
||||||
<groupId>io.repaint.maven</groupId>
|
<groupId>io.repaint.maven</groupId>
|
||||||
<artifactId>tiles-maven-plugin</artifactId>
|
<artifactId>tiles-maven-plugin</artifactId>
|
||||||
<version>2.45</version>
|
<version>2.43</version>
|
||||||
</plugin>
|
</plugin>
|
||||||
</plugins>
|
</plugins>
|
||||||
</pluginManagement>
|
</pluginManagement>
|
||||||
@@ -162,7 +162,7 @@
|
|||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.sonatype.central</groupId>
|
<groupId>org.sonatype.central</groupId>
|
||||||
<artifactId>central-publishing-maven-plugin</artifactId>
|
<artifactId>central-publishing-maven-plugin</artifactId>
|
||||||
<version>0.10.0</version>
|
<version>0.8.0</version>
|
||||||
<extensions>true</extensions>
|
<extensions>true</extensions>
|
||||||
<configuration>
|
<configuration>
|
||||||
<publishingServerId>central</publishingServerId>
|
<publishingServerId>central</publishingServerId>
|
||||||
|
|||||||
+4
-4
@@ -6,7 +6,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.inteligr8.alfresco</groupId>
|
<groupId>com.inteligr8.alfresco</groupId>
|
||||||
<artifactId>asie-platform-module-parent</artifactId>
|
<artifactId>asie-platform-module-parent</artifactId>
|
||||||
<version>1.3-SNAPSHOT</version>
|
<version>1.3.6</version>
|
||||||
<relativePath>../</relativePath>
|
<relativePath>../</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
@@ -16,7 +16,7 @@
|
|||||||
<name>ASIE Shared Library for Platform Modules</name>
|
<name>ASIE Shared Library for Platform Modules</name>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
<alfresco.sdk.version>4.16.0</alfresco.sdk.version>
|
<alfresco.sdk.version>4.9.0</alfresco.sdk.version>
|
||||||
|
|
||||||
<common-rest-client.version>${commom-rest-client.base.version}-cxf</common-rest-client.version>
|
<common-rest-client.version>${commom-rest-client.base.version}-cxf</common-rest-client.version>
|
||||||
</properties>
|
</properties>
|
||||||
@@ -37,7 +37,7 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.inteligr8.alfresco</groupId>
|
<groupId>com.inteligr8.alfresco</groupId>
|
||||||
<artifactId>asie-api</artifactId>
|
<artifactId>asie-api</artifactId>
|
||||||
<version>1.2-SNAPSHOT-asie2</version>
|
<version>1.1.1-asie2</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.inteligr8</groupId>
|
<groupId>com.inteligr8</groupId>
|
||||||
@@ -73,7 +73,7 @@
|
|||||||
<repositories>
|
<repositories>
|
||||||
<repository>
|
<repository>
|
||||||
<id>alfresco-public</id>
|
<id>alfresco-public</id>
|
||||||
<url>https://artifacts.alfresco.com/nexus/repository/releases/</url>
|
<url>https://artifacts.alfresco.com/nexus/content/groups/public</url>
|
||||||
</repository>
|
</repository>
|
||||||
</repositories>
|
</repositories>
|
||||||
</project>
|
</project>
|
||||||
|
|||||||
+4
-4
@@ -44,10 +44,10 @@ public class ReconcileAcsNodesWebScript extends AbstractAsieWebScript {
|
|||||||
public void reconciled(long nodeDbId) {
|
public void reconciled(long nodeDbId) {
|
||||||
if (includeReconciled) {
|
if (includeReconciled) {
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
List<Long> reconciledNodeDbIds = (List<Long>) responseMap.get("reconciled");
|
List<Long> unreconciledNodeDbIds = (List<Long>) responseMap.get("reconciled");
|
||||||
if (reconciledNodeDbIds == null)
|
if (unreconciledNodeDbIds == null)
|
||||||
responseMap.put("reconciled", reconciledNodeDbIds = new LinkedList<>());
|
responseMap.put("reconciled", unreconciledNodeDbIds = new LinkedList<>());
|
||||||
reconciledNodeDbIds.add(nodeDbId);
|
unreconciledNodeDbIds.add(nodeDbId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+4
@@ -232,6 +232,10 @@ public abstract class AbstractNodeActionService implements DisposableBean {
|
|||||||
private List<com.inteligr8.alfresco.asie.model.ShardInstance> findPossibleShardInstances(long nodeDbId) {
|
private List<com.inteligr8.alfresco.asie.model.ShardInstance> findPossibleShardInstances(long nodeDbId) {
|
||||||
if (this.shardRegistry == null)
|
if (this.shardRegistry == null)
|
||||||
throw new UnsupportedOperationException("ACS instances without a sharding configuration are not yet implemented");
|
throw new UnsupportedOperationException("ACS instances without a sharding configuration are not yet implemented");
|
||||||
|
|
||||||
|
// SearchParameters searchParams = new SearchParameters();
|
||||||
|
// searchParams.setLanguage(SearchService.LANGUAGE_FTS_ALFRESCO);
|
||||||
|
// searchParams.setQuery("@" + this.formatForFts(ContentModel.PROP_NODE_DBID) + ":" + nodeDbId);
|
||||||
|
|
||||||
List<com.inteligr8.alfresco.asie.model.ShardInstance> instances = new LinkedList<>();
|
List<com.inteligr8.alfresco.asie.model.ShardInstance> instances = new LinkedList<>();
|
||||||
|
|
||||||
|
|||||||
@@ -59,7 +59,7 @@ public class AcsReconcileService implements DisposableBean {
|
|||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private ReindexService reindexService;
|
private ReindexService reindexService;
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private ExecutorManager executorManager;
|
private ExecutorManager executorManager;
|
||||||
|
|
||||||
@@ -75,12 +75,6 @@ public class AcsReconcileService implements DisposableBean {
|
|||||||
@Value("${inteligr8.asie.reconciliation.concurrency}")
|
@Value("${inteligr8.asie.reconciliation.concurrency}")
|
||||||
private int concurrency;
|
private int concurrency;
|
||||||
|
|
||||||
@Value("${inteligr8.asie.reconciliation.waitAfterSolrNodeActionMillis}")
|
|
||||||
private long waitAfterSolrNodeActionMillis;
|
|
||||||
|
|
||||||
@Value("${inteligr8.asie.reconciliation.waitAfterSolrNodeReconcileMillis}")
|
|
||||||
private long waitAfterSolrNodeReconcileMillis;
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void destroy() {
|
public void destroy() {
|
||||||
ExecutorService executor = this.executorManager.get("solr-reconcile");
|
ExecutorService executor = this.executorManager.get("solr-reconcile");
|
||||||
@@ -106,7 +100,7 @@ public class AcsReconcileService implements DisposableBean {
|
|||||||
*
|
*
|
||||||
* There are two sets of parameters regarding timeouts. The queue timeouts
|
* There are two sets of parameters regarding timeouts. The queue timeouts
|
||||||
* are for how long the requesting thread should wait for a full queue to
|
* are for how long the requesting thread should wait for a full queue to
|
||||||
* open up space for new reconcile executions. The execution timeouts are
|
* open up space for new re-index executions. The execution timeouts are
|
||||||
* for how long the execution should be allowed to take once dequeued.
|
* for how long the execution should be allowed to take once dequeued.
|
||||||
* There is no timeout for how long the execution is queued.
|
* There is no timeout for how long the execution is queued.
|
||||||
*
|
*
|
||||||
@@ -117,10 +111,10 @@ public class AcsReconcileService implements DisposableBean {
|
|||||||
* @param callback A callback to process multiple returned values from the re-index.
|
* @param callback A callback to process multiple returned values from the re-index.
|
||||||
* @param queueTimeout A timeout for how long the calling thread should wait for space on the queue.
|
* @param queueTimeout A timeout for how long the calling thread should wait for space on the queue.
|
||||||
* @param queueUnit The time units for the `queueTimeout`.
|
* @param queueUnit The time units for the `queueTimeout`.
|
||||||
* @param execTimeout A timeout for the elapsed time the reconcile execution should take when dequeued.
|
* @param execTimeout A timeout for the elapsed time the reindex execution should take when dequeued.
|
||||||
* @param execUnit The time units for the `execTimeout`.
|
* @param execUnit The time units for the `execTimeout`.
|
||||||
* @throws TimeoutException Either the queue or execution timeout lapsed.
|
* @throws TimeoutException Either the queue or execution timeout lapsed.
|
||||||
* @throws InterruptedException The reconciliation was interrupted (server shutdown).
|
* @throws InterruptedException The re-index was interrupted (server shutdown).
|
||||||
*/
|
*/
|
||||||
public void reconcile(
|
public void reconcile(
|
||||||
long fromDbId, long toDbId, Integer nodesChunkSize,
|
long fromDbId, long toDbId, Integer nodesChunkSize,
|
||||||
@@ -129,10 +123,18 @@ public class AcsReconcileService implements DisposableBean {
|
|||||||
ReconcileCallback callback,
|
ReconcileCallback callback,
|
||||||
long queueTimeout, TimeUnit queueUnit,
|
long queueTimeout, TimeUnit queueUnit,
|
||||||
long execTimeout, TimeUnit execUnit) throws InterruptedException, TimeoutException {
|
long execTimeout, TimeUnit execUnit) throws InterruptedException, TimeoutException {
|
||||||
|
if (nodesChunkSize == null)
|
||||||
|
nodesChunkSize = this.nodesChunkSize;
|
||||||
if (this.logger.isTraceEnabled())
|
if (this.logger.isTraceEnabled())
|
||||||
this.logger.trace("reconcile({}, {}, {}, {}, {}, {}, {})", fromDbId, toDbId, nodesChunkSize, indexUnreconciled, reindexReconciled, queueUnit.toMillis(queueTimeout), execUnit.toMillis(execTimeout));
|
this.logger.trace("reconcile({}, {}, {}, {}, {}, {}, {})", fromDbId, toDbId, nodesChunkSize, indexUnreconciled, reindexReconciled, queueUnit.toMillis(queueTimeout), execUnit.toMillis(execTimeout));
|
||||||
|
|
||||||
|
CompositeFuture<Void> future = new CompositeFuture<>();
|
||||||
|
|
||||||
Future<Void> future = this._reconcile(fromDbId, toDbId, nodesChunkSize, indexUnreconciled, reindexReconciled, callback, queueTimeout, queueUnit, execTimeout, execUnit);
|
for (long startDbId = fromDbId; startDbId < toDbId; startDbId += nodesChunkSize) {
|
||||||
|
long endDbId = Math.min(toDbId, startDbId + nodesChunkSize);
|
||||||
|
future.combine(this.reconcileChunk(startDbId, endDbId, indexUnreconciled, reindexReconciled, callback, queueTimeout, queueUnit, execTimeout, execUnit));
|
||||||
|
future.purge(true);
|
||||||
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
future.get(execTimeout, execUnit);
|
future.get(execTimeout, execUnit);
|
||||||
@@ -141,52 +143,27 @@ public class AcsReconcileService implements DisposableBean {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* This method reconciles the specified node range between ACS and Solr.
|
|
||||||
* The node range is specified using the ACS unique database identifiers.
|
|
||||||
* There is no other reasonably efficient attack vector. The callback
|
|
||||||
* handles all the return values. This is the synchronous alternative to
|
|
||||||
* the other `reconcile` method.
|
|
||||||
*
|
|
||||||
* @param fromDbId A node database ID, inclusive.
|
|
||||||
* @param toDbId A node database ID, exclusive.
|
|
||||||
* @param indexUnreconciled For nodes not found in Solr, attempt to index against all applicable Solr instances.
|
|
||||||
* @param reindexReconciled For nodes found in Solr, attempt to re-index against all applicable Solr instances.
|
|
||||||
* @param callback A callback to process multiple returned values from the re-index.
|
|
||||||
* @throws InterruptedException The reconciliation was interrupted (server shutdown).
|
|
||||||
*/
|
|
||||||
public Future<Void> reconcile(
|
public Future<Void> reconcile(
|
||||||
long fromDbId, long toDbId, Integer nodesChunkSize,
|
long fromDbId, long toDbId, Integer nodesChunkSize,
|
||||||
boolean indexUnreconciled,
|
boolean indexUnreconciled,
|
||||||
boolean reindexReconciled,
|
boolean reindexReconciled,
|
||||||
ReconcileCallback callback) throws InterruptedException {
|
ReconcileCallback callback) throws InterruptedException {
|
||||||
|
if (nodesChunkSize == null)
|
||||||
|
nodesChunkSize = this.nodesChunkSize;
|
||||||
this.logger.trace("reconcile({}, {}, {}, {}, {})", fromDbId, toDbId, nodesChunkSize, indexUnreconciled, reindexReconciled);
|
this.logger.trace("reconcile({}, {}, {}, {}, {})", fromDbId, toDbId, nodesChunkSize, indexUnreconciled, reindexReconciled);
|
||||||
|
|
||||||
|
CompositeFuture<Void> future = new CompositeFuture<>();
|
||||||
|
|
||||||
try {
|
try {
|
||||||
return this._reconcile(fromDbId, toDbId, nodesChunkSize, indexUnreconciled, reindexReconciled, callback, -1L, null, -1L, null);
|
for (long startDbId = fromDbId; startDbId < toDbId; startDbId += nodesChunkSize) {
|
||||||
|
long endDbId = Math.min(toDbId, startDbId + nodesChunkSize);
|
||||||
|
future.combine(this.reconcileChunk(startDbId, endDbId, indexUnreconciled, reindexReconciled, callback, -1L, null, -1L, null));
|
||||||
|
future.purge(true);
|
||||||
|
}
|
||||||
} catch (TimeoutException te) {
|
} catch (TimeoutException te) {
|
||||||
throw new RuntimeException("This should never happen: " + te.getMessage(), te);
|
throw new RuntimeException("This should never happen: " + te.getMessage(), te);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
protected Future<Void> _reconcile(
|
|
||||||
long fromDbId, long toDbId, Integer nodesChunkSize,
|
|
||||||
boolean indexUnreconciled,
|
|
||||||
boolean reindexReconciled,
|
|
||||||
ReconcileCallback callback,
|
|
||||||
long queueTimeout, TimeUnit queueUnit,
|
|
||||||
long execTimeout, TimeUnit execUnit) throws InterruptedException, TimeoutException {
|
|
||||||
if (nodesChunkSize == null)
|
|
||||||
nodesChunkSize = this.nodesChunkSize;
|
|
||||||
|
|
||||||
CompositeFuture<Void> future = new CompositeFuture<>();
|
|
||||||
|
|
||||||
for (long startDbId = fromDbId; startDbId < toDbId; startDbId += nodesChunkSize) {
|
|
||||||
long endDbId = Math.min(toDbId, startDbId + nodesChunkSize);
|
|
||||||
future.combine(this.reconcileChunk(startDbId, endDbId, indexUnreconciled, reindexReconciled, callback, queueTimeout, queueUnit, execTimeout, execUnit));
|
|
||||||
future.purge(true);
|
|
||||||
}
|
|
||||||
|
|
||||||
return future;
|
return future;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -239,7 +216,6 @@ public class AcsReconcileService implements DisposableBean {
|
|||||||
this.logger.trace("Attempting to reconcile ACS node: {}", nodeDbId);
|
this.logger.trace("Attempting to reconcile ACS node: {}", nodeDbId);
|
||||||
|
|
||||||
Callable<Void> callable;
|
Callable<Void> callable;
|
||||||
boolean callingSolr = false;
|
|
||||||
|
|
||||||
final int dbIdIndex = (int) (nodeDbId - fromDbId);
|
final int dbIdIndex = (int) (nodeDbId - fromDbId);
|
||||||
if (nodeRefs[dbIdIndex] != null) {
|
if (nodeRefs[dbIdIndex] != null) {
|
||||||
@@ -259,8 +235,6 @@ public class AcsReconcileService implements DisposableBean {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
if (reindexReconciled)
|
|
||||||
callingSolr = true;
|
|
||||||
} else {
|
} else {
|
||||||
callable = new Callable<Void>() {
|
callable = new Callable<Void>() {
|
||||||
@Override
|
@Override
|
||||||
@@ -269,7 +243,6 @@ public class AcsReconcileService implements DisposableBean {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
callingSolr = true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (queueTimeout < 0L) {
|
if (queueTimeout < 0L) {
|
||||||
@@ -277,42 +250,36 @@ public class AcsReconcileService implements DisposableBean {
|
|||||||
} else {
|
} else {
|
||||||
future.combine(executor.submit(callable, queueTimeout, queueUnit));
|
future.combine(executor.submit(callable, queueTimeout, queueUnit));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (callingSolr && this.waitAfterSolrNodeReconcileMillis > 0L) {
|
|
||||||
this.logger.trace("Waiting between each node reconcile");
|
|
||||||
Thread.sleep(this.waitAfterSolrNodeReconcileMillis);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return future;
|
return future;
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean reconcile(long nodeDbId,
|
public void reconcile(long nodeDbId,
|
||||||
boolean index,
|
boolean index,
|
||||||
ReconcileCallback callback) throws InterruptedException, TimeoutException {
|
ReconcileCallback callback) throws InterruptedException, TimeoutException {
|
||||||
NodeRef nodeRef = this.nodeService.getNodeRef(nodeDbId);
|
NodeRef nodeRef = this.nodeService.getNodeRef(nodeDbId);
|
||||||
if (nodeRef == null) {
|
if (nodeRef == null) {
|
||||||
this.logger.trace("No such ACS node: {}; skipping ...", nodeDbId);
|
this.logger.trace("No such ACS node: {}; skipping ...", nodeDbId);
|
||||||
return false;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!StoreRef.STORE_REF_WORKSPACE_SPACESSTORE.equals(nodeRef.getStoreRef())) {
|
if (!StoreRef.STORE_REF_WORKSPACE_SPACESSTORE.equals(nodeRef.getStoreRef())) {
|
||||||
this.logger.trace("A deliberately ignored store in the DB is not indexed in Solr: {}: {}", nodeDbId, nodeRef);
|
this.logger.trace("A deliberately ignored store in the DB is not indexed in Solr: {}: {}", nodeDbId, nodeRef);
|
||||||
return false;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
Set<QName> aspects = this.nodeService.getAspects(nodeRef);
|
Set<QName> aspects = this.nodeService.getAspects(nodeRef);
|
||||||
aspects.retainAll(this.ignoreNodesWithAspects);
|
aspects.retainAll(this.ignoreNodesWithAspects);
|
||||||
if (!aspects.isEmpty()) {
|
if (!aspects.isEmpty()) {
|
||||||
this.logger.trace("A deliberately ignored node in the DB is not indexed in Solr: {}: {}: {}", nodeDbId, nodeRef, aspects);
|
this.logger.trace("A deliberately ignored node in the DB is not indexed in Solr: {}: {}: {}", nodeDbId, nodeRef, aspects);
|
||||||
return false;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!index) {
|
if (!index) {
|
||||||
this.logger.debug("A node in the DB is not indexed in Solr: {}: {}", nodeDbId, nodeRef);
|
this.logger.debug("A node in the DB is not indexed in Solr: {}: {}", nodeDbId, nodeRef);
|
||||||
this.reconcileLogger.info("UNRECONCILED: {} <=> {}", nodeDbId, nodeRef);
|
this.reconcileLogger.info("UNRECONCILED: {} <=> {}", nodeDbId, nodeRef);
|
||||||
callback.unreconciled(nodeDbId);
|
callback.unreconciled(nodeDbId);
|
||||||
return false;
|
|
||||||
} else {
|
} else {
|
||||||
this.logger.debug("A node in the DB is not indexed in Solr; attempt to index: {}: {}", nodeDbId, nodeRef);
|
this.logger.debug("A node in the DB is not indexed in Solr; attempt to index: {}: {}", nodeDbId, nodeRef);
|
||||||
this.index(nodeDbId, nodeRef, callback);
|
this.index(nodeDbId, nodeRef, callback);
|
||||||
@@ -320,7 +287,6 @@ public class AcsReconcileService implements DisposableBean {
|
|||||||
// its results will be logged
|
// its results will be logged
|
||||||
// the reconcile thread will continue independently
|
// the reconcile thread will continue independently
|
||||||
// the callback will lag
|
// the callback will lag
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -355,13 +321,7 @@ public class AcsReconcileService implements DisposableBean {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
Future<Void> future = this.indexService.index(nodeDbId, indexCallback);
|
return this.indexService.index(nodeDbId, indexCallback);
|
||||||
|
|
||||||
if (this.waitAfterSolrNodeActionMillis > 0L) {
|
|
||||||
Thread.sleep(this.waitAfterSolrNodeActionMillis);
|
|
||||||
}
|
|
||||||
|
|
||||||
return future;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public Future<Void> reindex(long nodeDbId, NodeRef nodeRef, ReconcileCallback callback) throws InterruptedException {
|
public Future<Void> reindex(long nodeDbId, NodeRef nodeRef, ReconcileCallback callback) throws InterruptedException {
|
||||||
@@ -395,13 +355,7 @@ public class AcsReconcileService implements DisposableBean {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
Future<Void> future = this.reindexService.reindex(nodeDbId, reindexCallback);
|
return this.reindexService.reindex(nodeDbId, reindexCallback);
|
||||||
|
|
||||||
if (this.waitAfterSolrNodeActionMillis > 0L) {
|
|
||||||
Thread.sleep(this.waitAfterSolrNodeActionMillis);
|
|
||||||
}
|
|
||||||
|
|
||||||
return future;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private String formatForFts(QName qname) {
|
private String formatForFts(QName qname) {
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ import com.inteligr8.alfresco.asie.util.ThrottledThreadPoolExecutor;
|
|||||||
*/
|
*/
|
||||||
@Component
|
@Component
|
||||||
public class ExecutorManager implements InitializingBean, DisposableBean, RemovalListener<String, ExecutorService> {
|
public class ExecutorManager implements InitializingBean, DisposableBean, RemovalListener<String, ExecutorService> {
|
||||||
|
|
||||||
private final Logger logger = LoggerFactory.getLogger(this.getClass());
|
private final Logger logger = LoggerFactory.getLogger(this.getClass());
|
||||||
|
|
||||||
@Value("${inteligr8.asie.executors.expireTimeInMinutes}")
|
@Value("${inteligr8.asie.executors.expireTimeInMinutes}")
|
||||||
|
|||||||
@@ -72,7 +72,7 @@ public class SolrShardHashService {
|
|||||||
this.logger.debug("Unable to determine shard instance ID because property does not exist on node: {}: {}", nodeRef, hashableProperty);
|
this.logger.debug("Unable to determine shard instance ID because property does not exist on node: {}: {}", nodeRef, hashableProperty);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.logger.trace("Discovered node property for sharding: {} => {}", nodeRef, fullPropertyValue);
|
this.logger.trace("Discovered node property for sharding: {} => {}", nodeRef, fullPropertyValue);
|
||||||
|
|
||||||
String hashableValue = null;
|
String hashableValue = null;
|
||||||
|
|||||||
@@ -125,9 +125,7 @@ public interface ShardDiscoveryService {
|
|||||||
public class ShardedNodeShardStateComparator implements Comparator<Pair<SolrHost, ShardInstanceState>> {
|
public class ShardedNodeShardStateComparator implements Comparator<Pair<SolrHost, ShardInstanceState>> {
|
||||||
@Override
|
@Override
|
||||||
public int compare(Pair<SolrHost, ShardInstanceState> p1, Pair<SolrHost, ShardInstanceState> p2) {
|
public int compare(Pair<SolrHost, ShardInstanceState> p1, Pair<SolrHost, ShardInstanceState> p2) {
|
||||||
if (p1 == null) return 1;
|
return - Long.compare(p1.getSecond().getLastIndexedTxId(), p2.getSecond().getLastIndexedTxId());
|
||||||
else if (p2 == null) return -1;
|
|
||||||
else return - Long.compare(p1.getSecond().getLastIndexedTxId(), p2.getSecond().getLastIndexedTxId());
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -79,14 +79,12 @@ public class CompositeFuture<T> implements Future<T> {
|
|||||||
List<T> results = new ArrayList<>(this.futures.size());
|
List<T> results = new ArrayList<>(this.futures.size());
|
||||||
for (Future<T> future : this.futures) {
|
for (Future<T> future : this.futures) {
|
||||||
if (future instanceof RunnableFuture<?>) {
|
if (future instanceof RunnableFuture<?>) {
|
||||||
this.logger.trace("Waiting {} ms since the start of the exectuion of the future to complete", unit.toMillis(timeout));
|
this.logger.debug("Waiting {} ms since the start of the execution of the future to complete", unit.toMillis(timeout));
|
||||||
results.add(((RunnableFuture<T>) future).get(timeout, unit));
|
results.add(((RunnableFuture<T>) future).get(timeout, unit));
|
||||||
this.logger.trace("Exectuion completed", unit.toMillis(timeout));
|
|
||||||
} else {
|
} else {
|
||||||
long remainingTimeMillis = expireTimeMillis - System.currentTimeMillis();
|
long remainingTimeMillis = expireTimeMillis - System.currentTimeMillis();
|
||||||
this.logger.trace("Waiting {} ms for the future to complete", remainingTimeMillis);
|
this.logger.debug("Waiting {} ms for the future to complete", remainingTimeMillis);
|
||||||
results.add(future.get(remainingTimeMillis, TimeUnit.MILLISECONDS));
|
results.add(future.get(remainingTimeMillis, TimeUnit.MILLISECONDS));
|
||||||
this.logger.trace("Exectuion completed", unit.toMillis(timeout));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -133,24 +131,14 @@ public class CompositeFuture<T> implements Future<T> {
|
|||||||
Future<T> future = i.next();
|
Future<T> future = i.next();
|
||||||
if (future.isCancelled()) {
|
if (future.isCancelled()) {
|
||||||
if (includeCancelled) {
|
if (includeCancelled) {
|
||||||
this.logger.trace("Removing cancelled future");
|
|
||||||
removedCancelled++;
|
removedCancelled++;
|
||||||
i.remove();
|
i.remove();
|
||||||
} else {
|
} else {
|
||||||
remain++;
|
remain++;
|
||||||
}
|
}
|
||||||
} else if (future.isDone()) {
|
} else if (future.isDone()) {
|
||||||
try {
|
removedDone++;
|
||||||
future.get();
|
i.remove();
|
||||||
} catch (InterruptedException ie) {
|
|
||||||
this.logger.trace("Future completed because it was interrupted");
|
|
||||||
} catch (ExecutionException ee) {
|
|
||||||
this.logger.error(ee.getMessage(), ee);
|
|
||||||
} finally {
|
|
||||||
this.logger.trace("Removing completed future");
|
|
||||||
removedDone++;
|
|
||||||
i.remove();
|
|
||||||
}
|
|
||||||
} else if (future instanceof CompositeFuture<?>) {
|
} else if (future instanceof CompositeFuture<?>) {
|
||||||
cfutures.add((CompositeFuture<?>) future);
|
cfutures.add((CompositeFuture<?>) future);
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
-2
@@ -19,8 +19,6 @@ inteligr8.asie.reconciliation.nodesChunkSize=250
|
|||||||
inteligr8.asie.reconciliation.nodeTimeoutSeconds=10
|
inteligr8.asie.reconciliation.nodeTimeoutSeconds=10
|
||||||
inteligr8.asie.reconciliation.concurrentQueueSize=32
|
inteligr8.asie.reconciliation.concurrentQueueSize=32
|
||||||
inteligr8.asie.reconciliation.concurrency=2
|
inteligr8.asie.reconciliation.concurrency=2
|
||||||
inteligr8.asie.reconciliation.waitAfterSolrNodeActionMillis=0
|
|
||||||
inteligr8.asie.reconciliation.waitAfterSolrNodeReconcileMillis=0
|
|
||||||
|
|
||||||
# Action (like indexing and re-indexing) configuration
|
# Action (like indexing and re-indexing) configuration
|
||||||
inteligr8.asie.default.concurrentQueueSize=32
|
inteligr8.asie.default.concurrentQueueSize=32
|
||||||
|
|||||||
+5
-5
@@ -6,31 +6,31 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.inteligr8.alfresco</groupId>
|
<groupId>com.inteligr8.alfresco</groupId>
|
||||||
<artifactId>asie-platform-module-parent</artifactId>
|
<artifactId>asie-platform-module-parent</artifactId>
|
||||||
<version>1.3-SNAPSHOT</version>
|
<version>1.3.6</version>
|
||||||
<relativePath>../</relativePath>
|
<relativePath>../</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<groupId>com.inteligr8</groupId>
|
<groupId>com.inteligr8</groupId>
|
||||||
<artifactId>solr-api</artifactId>
|
<artifactId>solr-api</artifactId>
|
||||||
<version>1.2-SNAPSHOT-solr6</version>
|
<version>1.1.0-solr6</version>
|
||||||
<packaging>jar</packaging>
|
<packaging>jar</packaging>
|
||||||
|
|
||||||
<name>Apache Solr Jakarta RS API</name>
|
<name>Apache Solr Jakarta RS API</name>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
<jackson.version>2.22.1</jackson.version>
|
<jackson.version>2.21.1</jackson.version>
|
||||||
</properties>
|
</properties>
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>jakarta.annotation</groupId>
|
<groupId>jakarta.annotation</groupId>
|
||||||
<artifactId>jakarta.annotation-api</artifactId>
|
<artifactId>jakarta.annotation-api</artifactId>
|
||||||
<version>3.0.0</version>
|
<version>2.1.1</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>jakarta.ws.rs</groupId>
|
<groupId>jakarta.ws.rs</groupId>
|
||||||
<artifactId>jakarta.ws.rs-api</artifactId>
|
<artifactId>jakarta.ws.rs-api</artifactId>
|
||||||
<version>4.0.0</version>
|
<version>3.1.0</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.fasterxml.jackson.module</groupId>
|
<groupId>com.fasterxml.jackson.module</groupId>
|
||||||
|
|||||||
Reference in New Issue
Block a user