Skip to content

Commit

Permalink
resolved some PR comments from Bowen
Browse files Browse the repository at this point in the history
Signed-off-by: Ronnak Saxena <[email protected]>
  • Loading branch information
ronnaksaxena committed Sep 7, 2023
1 parent bf04e32 commit d618e90
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -392,7 +392,7 @@ class IndexManagementPlugin : JobSchedulerExtension, NetworkPlugin, ActionPlugin
namedWriteableRegistry,
environment
)
rollupInterceptor = RollupInterceptor(clusterService, settings, indexNameExpressionResolver, xContentRegistry)
rollupInterceptor = RollupInterceptor(clusterService, settings, indexNameExpressionResolver)
responseInterceptor = ResponseInterceptor(clusterService, settings, indexNameExpressionResolver, client)
val jvmService = JvmService(environment.settings())
val transformRunner = TransformRunner.initialize(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import org.opensearch.cluster.ClusterState
import org.opensearch.cluster.metadata.IndexNameExpressionResolver
import org.opensearch.cluster.service.ClusterService
import org.opensearch.common.settings.Settings
import org.opensearch.core.xcontent.NamedXContentRegistry
import org.opensearch.index.query.QueryBuilder
import org.opensearch.index.query.TermQueryBuilder
import org.opensearch.index.query.TermsQueryBuilder
Expand Down Expand Up @@ -61,7 +60,6 @@ class RollupInterceptor(
val clusterService: ClusterService,
val settings: Settings,
val indexNameExpressionResolver: IndexNameExpressionResolver,
val xContentRegistry: NamedXContentRegistry
) : TransportInterceptor {

private val logger = LogManager.getLogger(javaClass)
Expand Down Expand Up @@ -206,7 +204,9 @@ class RollupInterceptor(
}
// Rewrite the request to fit rollup format if not already done previously
if (isRollupIndex && !isReqeustRollupFormat(request)) {
// TODO fix logic to allow response interceptor client calls to have a size of 1
/* Client calls from the response interceptor require request bodies of 1,
otherwise do not allow size > 0 for rollup indices
*/
if (!canHaveSize(request) && request.source().size() != 0) {
throw IllegalArgumentException(
"Rollup search must have size explicitly set to 0, " +
Expand Down

0 comments on commit d618e90

Please sign in to comment.