private static Exception RebuildIndexSystem(FailedSuspendedCatalogRebuildWorkflow workflow) { Exception result = null; SearchServiceRpcClient searchServiceRpcClient = null; bool flag = false; try { searchServiceRpcClient = RpcConnectionPool.GetSearchRpcClient(); searchServiceRpcClient.RebuildIndexSystem(workflow.Context.Database.Guid); flag = true; } catch (RpcException ex) { result = ex; } finally { if (searchServiceRpcClient != null) { RpcConnectionPool.ReturnSearchRpcClientToCache(ref searchServiceRpcClient, !flag); } } return(result); }
private void TryResumeIndexing() { if (RegistryParameters.IgnoreCatalogHealthSetByCI) { return; } ExTraceGlobals.SeederServerTracer.TraceDebug <string, Guid>((long)this.GetHashCode(), "CiFilesSeederInstance: Notify search service to resume indexing for database {0} ({1})", this.ConfigArgs.Name, this.ConfigArgs.IdentityGuid); SearchServiceRpcClient searchServiceRpcClient = null; bool discard = false; try { searchServiceRpcClient = RpcConnectionPool.GetSearchRpcClient(); searchServiceRpcClient.ResumeIndexing(this.ConfigArgs.IdentityGuid); } catch (RpcException arg) { ExTraceGlobals.SeederServerTracer.TraceError <RpcException>((long)this.GetHashCode(), "CiFilesSeederInstance: ResumeIndexing threw: {0}", arg); discard = true; } finally { if (searchServiceRpcClient != null) { RpcConnectionPool.ReturnSearchRpcClientToCache(ref searchServiceRpcClient, discard); } } }