]> git.aero2k.de Git - tmp/jakarta-migration.git/commitdiff
CSPACE-5359: Added comments to code that needs to change in order to prevent the...
authorRichard Millet <remillet@berkeley.edu>
Tue, 3 Jul 2012 18:50:55 +0000 (11:50 -0700)
committerRichard Millet <remillet@berkeley.edu>
Tue, 3 Jul 2012 18:50:55 +0000 (11:50 -0700)
services/common/src/main/java/org/collectionspace/services/common/vocabulary/RefNameServiceUtils.java

index c793447490b7b6ab489741c9f640646fe4bdfac1..a1dd2bd98fb6e23b3864bb8064b65cd2c624b2c6 100644 (file)
@@ -296,17 +296,17 @@ public class RefNameServiceUtils {
         if(!(repoClient instanceof RepositoryJavaClientImpl)) {\r
                throw new InternalError("updateAuthorityRefDocs() called with unknown repoClient type!");\r
         }\r
-        try {\r
-               final int pageSize = N_OBJS_TO_UPDATE_PER_LOOP; \r
+        try { // REM - How can we deal with transaction and timeout issues hear.\r
+               final int pageSize = N_OBJS_TO_UPDATE_PER_LOOP; // Set a limit of num of objects -something like 1000K objects and also add a log Warning after some threshold\r
                int pageNumProcessed = 1;\r
                while(true) {   // Keep looping until we find all the refs.\r
                        logger.debug("updateAuthorityRefDocs working on page: "+pageNumProcessed);\r
                        // Note that we always ask the Repo for the first page, since each page we process\r
                        // should not be found in successive searches. Slightly inefficient, but more\r
                        // reliable (stateless).\r
-                       DocumentModelList docList = findAuthorityRefDocs(ctx, repoClient, repoSession,\r
+                       DocumentModelList docList = findAuthorityRefDocs(ctx, repoClient, repoSession, //is there an orderBy clause?  set the orderby clause to something non-transient like createAt\r
                                        getRefNameServiceTypes(), oldRefName, refPropName,\r
-                                       queriedServiceBindings, authRefFieldsByService, null, pageSize, 0, false);\r
+                                       queriedServiceBindings, authRefFieldsByService, null, pageSize, 0, false /*don't compute total*/); //loop through the pages until we're finished -i.e., don't just keep getting the first page\r
                \r
                        if((docList == null)                    // found no authRef fields - nothing to do\r
                                || (docList.size() == 0)) {     // No more to handle\r