ostinru commented on code in PR #124:
URL: https://github.com/apache/cloudberry-pxf/pull/124#discussion_r3864494131
##########
server/pxf-service/src/main/java/org/apache/cloudberry/pxf/service/controller/ReadServiceImpl.java:
##########
@@ -84,6 +87,13 @@ private OperationResult writeStream(RequestContext context,
OutputStream outputS
try {
List<Fragment> fragments =
fragmenterService.getFragmentsForSegment(context);
for (int i = 0; i < fragments.size(); i++) {
+ // stop before starting the next fragment if the request was
+ // cancelled via pxf_cancel_backend
+ if (isCancelled()) {
+ log.info("Read of resource {} cancelled after {} of {}
fragments",
+ context.getDataSource(), i, fragments.size());
+ break;
Review Comment:
I think that we should end up in `catch` block. And explicitly return error
message.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]