JanusGraph / janusgraph-docker

JanusGraph Docker images
Other
98 stars 87 forks source link

Setting ids.block-size with Docker #99

Closed zeevo closed 2 years ago

zeevo commented 2 years ago

Hello

I'm having a hard time setting ids.block-size using docker-compose. I have tried setting the janusgraph.ids.block-size environment variable but I cannot see it reflected in the gremlin console on any of my graphs.

I am checking this by doing the following:

docker run --rm --network janusgraph_net -e GREMLIN_REMOTE_HOSTS=janusgraph -it janusgraph/janusgraph ./bin/gremlin.sh

And then connecting to the remote host

:remote connect tinkerpop.server conf/remote.yaml session
:remote console

And then checking the value (referencing: https://docs.janusgraph.org/configs/#global-configuration)

gremlin> mgmt = graph.openManagement()
==>org.janusgraph.graphdb.database.management.ManagementSystem@348bdff2
gremlin> mgmt.get("ids.block-size")
==>10000

And I set janusgraph.ids.block-size using the docker-compose.yml below:

version: '3.8'

services:
  janusgraph:
    image: janusgraph/janusgraph
    ports:
      - "8182:8182"
      - "8080:8080"
    environment:
      - "JANUS_PROPS_TEMPLATE=cql-es"
      - "janusgraph.ids.block-size=40000"
      - 'gremlinserver.graphs.mygraph=conf/mygraph/janusgraph.mygraph.properties'
    volumes:
      - './janusgraph-conf:/opt/janusgraph/conf/mygraph'
    restart: always
    healthcheck:
      test: ["CMD", "bin/gremlin.sh", "-e", "scripts/remote-connect.groovy"]
      interval: 1m
      timeout: 30s
      retries: 5
    networks:
      - janusgraph_net
networks:
  janusgraph_net:
    name: janusgraph_net

I would expect to see 40000 instead of the default 10000, along with any other graphs inheriting the 40000 too, but it's always the default. Can I have some help setting ids.block-size across all instances and graphs using Docker?

FlorianHockmann commented 2 years ago

I already replied to this on Gitter saying that this is an option with the mutability level GLOBAL_OFFLINE which means that it can only be changed at runtime via the management interface as described here in the docs.

If you need any further help with this, then I suggest that we continue the discussion on Gitter as we only use issues for concrete bug reports or feature requests. So, I'm closing this issue.