Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot create more that one cache at startup #42

Open
Alexis01 opened this issue May 17, 2022 · 1 comment
Open

Cannot create more that one cache at startup #42

Alexis01 opened this issue May 17, 2022 · 1 comment

Comments

@Alexis01
Copy link

Hi,

I tried to create more than one cache at startup but i have recived the following error

Red Hat Data Grid Server failed to start org.infinispan.commons.configuration.io.ConfigurationReaderException: Missing required attribute(s): name[86,1]

My helm yml is the following

deploy:
  infinispan:
    cacheContainer:
      distributedCache:
          - name: "mycache"
            mode: "SYNC"
            owners: "2"
            segments: "256"
            capacityFactor: "1.0"
            statistics: "false"
            encoding:
              mediaType: "application/x-protostream"
            expiration:
              lifespan: "3000"
              maxIdle: "1001"
            memory:
              maxCount: "1000000"
              whenFull: "REMOVE"
            partitionHandling:
              whenSplit: "ALLOW_READ_WRITES"
              mergePolicy: "PREFERRED_NON_NULL"
          - name: "mycache1"
            mode: "SYNC"
            owners: "2"
            segments: "256"
            capacityFactor: "1.0"
            statistics: "false"
            encoding:
              mediaType: "application/x-protostream"
            expiration:
              lifespan: "3000"
              maxIdle: "1001"
            memory:
              maxCount: "1000000"
              whenFull: "REMOVE"
            partitionHandling:
              whenSplit: "ALLOW_READ_WRITES"
              mergePolicy: "PREFERRED_NON_NULL"

Is possible to create more than one chache?

Thank you for your help.

@statkashaman
Copy link

statkashaman commented Sep 15, 2022

Hello, you need use this syntax, field name move to top of distributedCache.:

  cacheContainer:
    name: "default"
    statistics: "true"
    caches:
      mycacheone:
       distributedCache:
          mode: "ASYNC"
          statistics: "true"
          encoding:
            mediaType: "application/x-protostream"
          expiration:
            lifespan: "300000"
          memory:
            maxSize: "400MB"
            whenFull: "REMOVE"
      mycachetwo:
        distributedCache:
          mode: "SYNC"
          statistics: "true"
          encoding:
            mediaType: "application/x-protostream"
          expiration:
            lifespan: "300000"
          memory:
            maxSize: "400MB"
            whenFull: "REMOVE"```

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants