mirror of
https://github.com/Alfresco/SearchServices.git
synced 2026-09-16 18:12:56 +00:00
Add specific exception when Repository Service is not available to provide deeper information in the logs.
This commit is contained in:
+7
-3
@@ -87,9 +87,13 @@ public class MetadataTracker extends CoreStatePublisher implements Tracker
|
||||
client.getNextTxCommitTime(coreName, 0l);
|
||||
nextTxCommitTimeServiceAvailable = true;
|
||||
}
|
||||
catch (NoSuchMethodException e)
|
||||
{
|
||||
log.warn("nextTxCommitTimeService is not available. Upgrade your ACS Repository version in order to use this feature: {} ", e.getMessage());
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
log.warn("nextTxCommitTimeService is not available. Upgrade your ACS Repository version in order to use this feature", e);
|
||||
log.error("Checking nextTxCommitTimeService failed.", e);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -538,7 +542,7 @@ public class MetadataTracker extends CoreStatePublisher implements Tracker
|
||||
}
|
||||
|
||||
protected Transactions getSomeTransactions(BoundedDeque<Transaction> txnsFound, Long fromCommitTime, long timeStep,
|
||||
int maxResults, long endTime) throws AuthenticationException, IOException, JSONException, EncoderException
|
||||
int maxResults, long endTime) throws AuthenticationException, IOException, JSONException, EncoderException, NoSuchMethodException
|
||||
{
|
||||
|
||||
long actualTimeStep = timeStep;
|
||||
@@ -995,7 +999,7 @@ public class MetadataTracker extends CoreStatePublisher implements Tracker
|
||||
}
|
||||
|
||||
public IndexHealthReport checkIndex(Long toTx, Long toAclTx, Long fromTime, Long toTime)
|
||||
throws IOException, AuthenticationException, JSONException, EncoderException
|
||||
throws IOException, AuthenticationException, JSONException, EncoderException, NoSuchMethodException
|
||||
{
|
||||
// DB TX Count
|
||||
long firstTransactionCommitTime = 0;
|
||||
|
||||
+3
-2
@@ -1239,8 +1239,9 @@ public class SOLRAPIClient
|
||||
* @return Time of the next transaction
|
||||
* @throws IOException
|
||||
* @throws AuthenticationException
|
||||
* @throws NoSuchMethodException
|
||||
*/
|
||||
public Long getNextTxCommitTime(String coreName, Long fromCommitTime) throws AuthenticationException, IOException
|
||||
public Long getNextTxCommitTime(String coreName, Long fromCommitTime) throws AuthenticationException, IOException, NoSuchMethodException
|
||||
{
|
||||
StringBuilder url = new StringBuilder(GET_NEXT_TX_COMMIT_TIME);
|
||||
url.append("?").append("fromCommitTime").append("=").append(fromCommitTime);
|
||||
@@ -1252,7 +1253,7 @@ public class SOLRAPIClient
|
||||
response = repositoryHttpClient.sendRequest(get);
|
||||
if (response.getStatus() != HttpStatus.SC_OK)
|
||||
{
|
||||
throw new AlfrescoRuntimeException(coreName + " - GetNextTxCommitTime return status is "
|
||||
throw new NoSuchMethodException(coreName + " - GetNextTxCommitTime return status is "
|
||||
+ response.getStatus() + " when invoking " + url);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user