Project

Profile

Help

Bug #2016

closed

Premature exit from XQuery streaming

Added by Michael Kay about 10 years ago. Updated about 10 years ago.

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

100%

Estimated time:
Legacy ID:
Applies to branch:
Fix Committed on Branch:
Fixed in Maintenance Release:
Platforms:

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

Actions #1

Updated by Michael Kay about 10 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.

Actions #2

Updated by O'Neil Delpratt about 10 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

Please register to edit this issue

Also available in: Atom PDF