xiangfu0 commented on code in PR #20459:
URL: https://github.com/apache/pinot/pull/20459#discussion_r4795201629
##########
pinot-common/src/main/java/org/apache/pinot/common/response/broker/CursorResponseNative.java:
##########
@@ -101,6 +105,17 @@ public CursorResponseNative(BrokerResponse response) {
setTablesQueried(response.getTablesQueried());
Review Comment:
When `response` is itself a `CursorResponse`, `authorizedLookupTables` isn't
carried over by this constructor. A store that rebuilds its result through it
(the in-memory store used by the integration tests does, at
`MemoryResponseStore` line 67) then returns a null set, and
`ResponseStoreResource` answers 403 on every fetch. That is what fails
`CursorIntegrationTest` and `CursorWithAuthIntegrationTest`. Copying the field
here when the source is a `CursorResponse` should fix it.
##########
pinot-broker/src/main/java/org/apache/pinot/broker/requesthandler/BaseSingleStageBrokerRequestHandler.java:
##########
@@ -1494,6 +1494,7 @@ private void authorizeLookupTables(Set<String>
lookupTableNames, long requestId,
}
}
}
+ requestContext.addAuthorizedLookupTables(lookupTableNames);
Review Comment:
Is there a test that fails without this line? The delegate test adds to the
request context directly, so nothing asserts the recorded set on the
single-stage path. Related question: should tables read through an
`IN_SUBQUERY` (line 1696) be recorded for the recheck as well? I couldn't tell
whether the nested request's tables end up in the stored set.
--
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]