You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@manifoldcf.apache.org by kw...@apache.org on 2010/12/07 04:20:13 UTC
svn commit: r1042900 - in /incubator/lcf/branches/release-0.1-branch: ./
framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/repository/RepositoryHistoryManager.java
Author: kwright
Date: Tue Dec 7 03:20:13 2010
New Revision: 1042900
URL: http://svn.apache.org/viewvc?rev=1042900&view=rev
Log:
Pull up removal of legacy analysis code
Modified:
incubator/lcf/branches/release-0.1-branch/ (props changed)
incubator/lcf/branches/release-0.1-branch/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/repository/RepositoryHistoryManager.java
Propchange: incubator/lcf/branches/release-0.1-branch/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Dec 7 03:20:13 2010
@@ -1 +1 @@
-/incubator/lcf/trunk:1039159,1041674,1041679,1041763,1041885,1041968,1042383,1042836-1042837,1042896
+/incubator/lcf/trunk:1039159,1041674,1041679,1041763,1041885,1041968,1042383,1042836-1042837,1042896,1042898
Modified: incubator/lcf/branches/release-0.1-branch/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/repository/RepositoryHistoryManager.java
URL: http://svn.apache.org/viewvc/incubator/lcf/branches/release-0.1-branch/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/repository/RepositoryHistoryManager.java?rev=1042900&r1=1042899&r2=1042900&view=diff
==============================================================================
--- incubator/lcf/branches/release-0.1-branch/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/repository/RepositoryHistoryManager.java (original)
+++ incubator/lcf/branches/release-0.1-branch/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/repository/RepositoryHistoryManager.java Tue Dec 7 03:20:13 2010
@@ -39,9 +39,6 @@ public class RepositoryHistoryManager ex
protected final static String resultCodeField = "resultcode";
protected final static String resultDescriptionField = "resultdesc";
- /** Counter for kicking off analyze */
- protected static AnalyzeTracker tracker = new AnalyzeTracker();
-
/** Thread context */
protected IThreadContext threadContext;
@@ -174,7 +171,8 @@ public class RepositoryHistoryManager ex
if (resultDescription != null)
map.put(resultDescriptionField,resultDescription);
performInsert(map,null);
- conditionallyAnalyzeInsert();
+ // Not accurate, but best we can do without overhead
+ noteModifications(1,0,0);
return id;
}
@@ -682,54 +680,4 @@ public class RepositoryHistoryManager ex
}
- /** Conditionally do analyze operation.
- */
- protected void conditionallyAnalyzeInsert()
- throws ManifoldCFException
- {
- synchronized (tracker)
- {
- if (tracker.checkAnalyzeInsert())
- {
- // Do the analyze
- analyzeTable();
- // Simply reanalyze every 8000 inserts
- tracker.doAnalyze(8000);
- }
- }
- }
-
- /** Analyze tracker class.
- */
- protected static class AnalyzeTracker
- {
- // Number of records to insert before we need to analyze again
- protected long recordCount = 0;
-
- /** Constructor.
- */
- public AnalyzeTracker()
- {
-
- }
-
- /** Note an analyze.
- */
- public void doAnalyze(long repeatCount)
- {
- recordCount = repeatCount;
- }
-
- /** Prepare to insert/delete a record, and see if analyze is required.
- */
- public boolean checkAnalyzeInsert()
- {
- if (recordCount > 0L)
- recordCount--;
- return recordCount == 0L;
- }
-
-
- }
-
}