Project

Profile

Help

Bug #2016

Premature exit from XQuery streaming

Added by Michael Kay over 2 years ago. Updated about 2 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
s9api API
Sprint/Milestone:
-
Start date:
2014-02-26
Due date:
% Done:

100%

Spent time:
-
Legacy ID:
Applies to branch:
Fix Committed on Branch:
Fixed in Maintenance Release:
Found in version:
9.5
Fixed in version:
9.5.1.5

Description

When a query is evaluated using XQueryEvaluator.iterator(), there is no way of indicating that no further results are required (it returns a standard Java iterator, which does not have a close() method).

This is significant when streaming using saxon:stream(), because this involves a separate parser thread that is supplying data incrementally via a shared buffer. This thread remains in suspended animation waiting for the query thread to read data out of the shared buffer to make room for more data.

Reported by Gunther Rademacher on saxon-help list

History

#1 Updated by Michael Kay over 2 years ago

  • Status changed from In Progress to Resolved

For 9.5, I have added a close() method to XdmSequenceIterator; the result of XQueryEvaluator.iterate() needs to be cast to XdmSequenceIterator in order to invoke this method. I have tested that this works.

For 9.6, I will change the signature of XQueryEvaluator so that it declares XdmSequenceIterator as the return type.

#2 Updated by O'Neil Delpratt about 2 years ago

  • Status changed from Resolved to Closed
  • % Done changed from 0 to 100
  • Fixed in version set to 9.5.1.5

Bug fix applied in Saxon maintenance release 9.5.1.5

Also available in: Atom PDF