On 2012-01-20 15:22, Bart van der Schans wrote:
Hi all,

I was wondering about how the ConsistencyCheckerImpl fetches all the
node ids. The first set of node ids is fetched with
"pm.getAllNodeIds(null, NODESATONCE)" in the internalCheckConsistency
method. All subsequent sets are fetched with "pm.getAllNodeIds(lastId,
NODESATONCE)".

In the BundleDbPersistenceManager the method
getAllNodeIds(NodeId,maxCount) uses the "bundleSelectAllIdsSQL" if the
first parameter is null otherwise the "bundleSelectAllIdsFromSQL"
query. The  "bundleSelectAllIdsSQL" query doesn't use ordering and the
"bundleSelectAllIdsFromSQL" does.

Now my question is the following: souldn't the "bundleSelectAllIdsSQL"
also use an order clause to make sure the correct batch of node ids is
fetched the first time? Or is that somehow implicitly guaranteed?

Good question. I was confused about that as well. I tried and stepped through he code and everything seem to worked as advertised, so I stopped worrying about it :-)

Reply via email to