Issue Details (XML | Word | Printable)

Key: NUCMONGODB-123
Type: Bug Bug
Status: Closed Closed
Resolution: Cannot Reproduce
Priority: No Testcase No Testcase
Assignee: Unassigned
Reporter: Alex Beggs
Votes: 0
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
DataNucleus Store MongoDB

Query range using limit returns incorrect number of values

Created: 13/Jun/13 11:42 PM   Updated: 22/Oct/13 11:44 AM   Resolved: 11/Oct/13 11:01 AM
Component/s: Query
Affects Version/s: 3.2.2
Fix Version/s: None

Datastore: MongoDB
Severity: Production


 Description  « Hide
A patch for NUCMONGODB-80 introduced a problem that causes the range application to be applied twice on the query results.

If I understand this correctly, we are applying the filtering on a particular range twice when we don't order the query. When we aren't ordering, and sending the range limitation to be applied by the MongoDB datastore, we do not turn off the JPQLEvaluator's

execute(boolean applyFilter, boolean applyOrdering, boolean applyResult, boolean applyResultClass, boolean applyRange)

See http://datanucleus.svn.sourceforge.net/viewvc/datanucleus/platform/store.mongodb/trunk/src/java/org/datanucleus/store/mongodb/query/JPQLQuery.java?revision=16696&view=markup

line 275 we conditionally apply range
line 303 we unconditionally apply a range

applyRange = (ordering != null); // line 302 should have this value for the applyRange variable - or maybe it is dependent on the filterInMemory (you would know best)





Sort Order: Ascending order - Click to sort in descending order
Andy Jefferson added a comment - 14/Jun/13 08:27 AM
All issues require a testcase to demonstrate something, so then everyone knows/sees what is being discussed

Andy Jefferson added a comment - 11/Oct/13 11:01 AM
No testcase. Suggest the raiser uses current SVN trunk, develops a testcase and, if a problem occurs, provides that testcase