> From: Gareth Boden <[EMAIL PROTECTED]> > > We've migrated a national public sector e-procurement system to Torque > from plain JDBC... it's a big production use, and for indexing a > catalogue of many tens of thousands of records with Lucene, LargeSelect > is an absolute necessity! Interesting use for LargeSelect - it is mainly designed for providing paging of large result sets for display to users. There is a patch in Scarab that may be of interest (http://nagoya.apache.org/scarab/issues/id/TRQS18) but I am unsure if a committer has looked into this yet. > > Bit concerned about your comments on turbine community shrinkage, what's > going on here do you think? 1. People are busy elsewhere 2. People have moved on 3. People may resurface soon with an alternative to turbine 4. Some new blood is needed but the catch-22 is that the old committers need to propose and vote on new committers > > I'll have a look at the scarab thingy. I was just concerned that I was > finding things, fixing things, and other people weren't getting any > benefit (which is kinda the point of this open source thing). I wasn't > sure if that was because my patches and add-ons were not acceptable or > if they just weren't being noticed because they were in the wrong place. While there is still no guarantee that issues entered into Scarab will be dealt with, they will at least be stored in a common location so they won't get lost. What I do is post a comment to the patches I submit every few days asking if the patch is ever going to be committed (not so successfully so far). I think a that includes a test case will have a much greater chance of being looked because it makes life much easier for the committer to verify that it does what it says it does. > > Unified diff below. I've no idea how you could produce a junit testcase > for this one either. Btw, I have problems producing diffs for some of my > changes because they are cumulative on top of other more major > enhancements (such as the betwixt XML support) I added so I can't diff > against the HEAD of that file and get anything meaningful.. is there a > good way around this? I am not sure if making your patches dependant on one another in Scarab will deal with this problem. Another way (more work) would be to make your code change against a fresh check out of the cvs module.
I'll take a look at your patch and try the tests locally. If all is okay I will raise an issue in Scarab and kick someone to get it committed. Cheers, Scott -- Scott Eade Backstage Technologies Pty. Ltd. http://www.backstagetech.com.au > > Index: LargeSelect.java > =================================================================== > RCS file: /home/cvspublic/jakarta-turbine- > torque/src/java/org/apache/torque/util/LargeSelect.java,v > retrieving revision 1.7 > diff -u -r1.7 LargeSelect.java > --- LargeSelect.java 27 Sep 2002 16:09:20 -0000 1.7 > +++ LargeSelect.java 15 Oct 2002 16:40:37 -0000 > @@ -644,7 +644,11 @@ > + "start-blockBegin (" + fromIndex + ") through " > + "fromIndex + Math.min(size, results.size() - > fromIndex) (" > + toIndex + ")"); > - List returnResults = results.subList(fromIndex, toIndex); > + List returnResults; > + > + synchronized (results) { > + returnResults = new ArrayList(results.subList(fromIndex, > toIndex)); > + } > > if (null != returnBuilderClass) > { > @@ -716,9 +720,11 @@ > List tempResults > = BasePeer.getSelectResults(qds, size, false); > > - for (int i = 0, n = tempResults.size(); i < n; i++) > - { > - results.add(tempResults.get(i)); > + synchronized (results) { > + for (int i = 0, n = tempResults.size(); i < n; i++) > + { > + results.add(tempResults.get(i)); > + } > } > > currentlyFilledTo += tempResults.size(); > @@ -728,7 +734,9 @@ > // on the last page but we must now get rid of it. > if (results.size() == memoryLimit + 1) > { > - results.remove(currentlyFilledTo--); > + synchronized (results) { > + results.remove(currentlyFilledTo--); > + } > perhapsLastPage = false; > } > > > > Regards > Gareth -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
