Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 197596 Details for
Bug 348040
Over active search indexer
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
Fix
patch.txt (text/plain), 3.36 KB, created by
John Arthorne
on 2011-06-08 09:40:22 EDT
(
hide
)
Description:
Fix
Filename:
MIME Type:
Creator:
John Arthorne
Created:
2011-06-08 09:40:22 EDT
Size:
3.36 KB
patch
obsolete
>diff --git a/bundles/org.eclipse.orion.server.search/src/org/eclipse/orion/internal/server/search/IndexPurgeJob.java b/bundles/org.eclipse.orion.server.search/src/org/eclipse/orion/internal/server/search/IndexPurgeJob.java >index ca48005..abc6938 100644 >--- a/bundles/org.eclipse.orion.server.search/src/org/eclipse/orion/internal/server/search/IndexPurgeJob.java >+++ b/bundles/org.eclipse.orion.server.search/src/org/eclipse/orion/internal/server/search/IndexPurgeJob.java >@@ -139,7 +139,8 @@ public class IndexPurgeJob extends Job { > if (logger.isDebugEnabled()) > logger.debug("Purge job took " + duration + "ms"); //$NON-NLS-1$ //$NON-NLS-2$ > >- long delay = Math.max(DEFAULT_DELAY, duration); >+ //throttle scheduling frequency so the job never runs more than 5% of the time >+ long delay = Math.max(DEFAULT_DELAY, duration * 20); > schedule(delay); > return Status.OK_STATUS; > } >diff --git a/bundles/org.eclipse.orion.server.search/src/org/eclipse/orion/internal/server/search/Indexer.java b/bundles/org.eclipse.orion.server.search/src/org/eclipse/orion/internal/server/search/Indexer.java >index e7c27b0..56f307b 100644 >--- a/bundles/org.eclipse.orion.server.search/src/org/eclipse/orion/internal/server/search/Indexer.java >+++ b/bundles/org.eclipse.orion.server.search/src/org/eclipse/orion/internal/server/search/Indexer.java >@@ -37,13 +37,16 @@ public class Indexer extends Job { > > private static final long DEFAULT_DELAY = 60000;//one minute > private static final long MAX_SEARCH_SIZE = 300000;//don't index files larger than 300,000 bytes >- private static final List<String> IGNORED_FILE_TYPES = Arrays.asList("png", "jpg", "gif", "bmp", "pdf", "tiff", "class", "so", "zip", "jar", "tar"); >+ //private static final List<String> IGNORED_FILE_TYPES = Arrays.asList("png", "jpg", "gif", "bmp", "pdf", "tiff", "class", "so", "zip", "jar", "tar"); >+ private final List<String> INDEXED_FILE_TYPES; > private final SolrServer server; > > public Indexer(SolrServer server) { > super("Indexing"); //$NON-NLS-1$ > this.server = server; > setSystem(true); >+ INDEXED_FILE_TYPES = Arrays.asList("css", "js", "html", "txt", "xml", "java", "properties", "php", "htm", "project", "conf", "pl", "sh", "text", "xhtml", "mf", "manifest"); >+ Collections.sort(INDEXED_FILE_TYPES); > } > > @Override >@@ -161,7 +164,7 @@ public class Indexer extends Job { > return true; > //skip files with no extension, or known binary file type extensions > String extension = new Path(fileInfo.getName()).getFileExtension(); >- if (extension == null || IGNORED_FILE_TYPES.contains(extension)) >+ if (extension == null || (Collections.binarySearch(INDEXED_FILE_TYPES, extension.toLowerCase()) < 0)) > return true; > return false; > } >@@ -205,8 +208,8 @@ public class Indexer extends Job { > Logger logger = LoggerFactory.getLogger(Indexer.class); > if (logger.isDebugEnabled()) > logger.debug("Indexed " + projects.size() + " projects in " + duration + "ms"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ >- //reschedule the indexing - throttle if it takes too long >- long delay = Math.max(DEFAULT_DELAY, duration); >+ //reschedule the indexing - throttle so the job never runs more than 5% of the time >+ long delay = Math.max(DEFAULT_DELAY, duration * 20); > if (logger.isDebugEnabled()) > logger.debug("Rescheduling indexing in " + delay + "ms"); //$NON-NLS-1$//$NON-NLS-2$ > schedule(delay);
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 348040
:
197257
|
197340
|
197341
| 197596