Advanced query joins limited to 3

Hello! I just noticed the following error. I have a view that has 4 joins.

Are the advanced views limited to 3 joins? I’m a bit confused because I haven’t seen any reference to this limit in the Views documentation.

19:33:03.600 ERROR kalix.javasdk.impl.DiscoveryImpl - Error reported from Kalix system: KLX-00101 This query isn't supported yet. Queries are limited to 3 JOINs.

Hi,

They are limited to 3 joins by default for performance reasons but that limit can be adjusted.

Is this when running locally or when deployed? For a deployed service, you would need to reach out to us directly through support. For running locally, there is a flag to enable all features but I’m not actually sure if it lifts that restriction. I will need to double check. If not, it’s certainly something we can add.

That’s great. I’m pretty sure I wouldn’t create performance issues :smiley:

However, how can I adjust that limit locally? Otherwise I can’t run it locally nor can run the integration tests.

I have set VIEW_FEATURES_ALL: "true" flag in docker-compose.yml and used .withAdvancedViews() setting for integration tests.

When running locally, you can increase that limit by setting kalix.proxy.view.features.max-joins on kalix runtime passed in through java tool options:

version: "3"
services:
  kalix-runtime:
    image: gcr.io/kalix-public/kalix-runtime:1.1.45
    container_name: java-spring-view-store
    ports:
      - "${ADVERTISED_HTTP_PORT}:9000"
    extra_hosts:
      - "host.docker.internal:host-gateway"
    environment:
      JAVA_TOOL_OPTIONS: -Dkalix.proxy.view.features.max-joins=4

Thank you @efgpinto . That works when running locally. But integration tests still fail.

And I’m running out of places where to add this Java option for the integration tests to read it. Reading through KalixTestKit things don’t look good: all JVM options are hardcoded there? :grimacing:

Right, I could not find a workaround for the integration tests. I have opened up this issue for follow up so we can add that. Thanks.

1 Like