Details

    • Sub-task
    • Status: Closed
    • Major
    • Resolution: Won't Fix
    • None
    • None
    • redis
    • None

    Description

      The Redis adapter does not appear to handle hash keys correctly.

      The following Example: Redis CLI works.
      localhost:11211> HSET companies name "John Smith"

      Using a HSET <region>:id .. produces an error
      Example:
      localhost:11211> HSET companies:1000 name "John Smith"

      [Server error]
      [fine 2017/02/10 16:04:33.289 EST server1 <Function Execution Processor2> tid=0x6a] Region names may only be alphanumeric and may contain hyphens or underscores: companies: 1000
      java.lang.IllegalArgumentException: Region names may only be alphanumeric and may contain hyphens or underscores: companies: 1000
      at org.apache.geode.internal.cache.LocalRegion.validateRegionName(LocalRegion.java:7618)
      at org.apache.geode.internal.cache.GemFireCacheImpl.createVMRegion(GemFireCacheImpl.java:3201)
      at org.apache.geode.internal.cache.GemFireCacheImpl.basicCreateRegion(GemFireCacheImpl.java:3181)
      at org.apache.geode.internal.cache.GemFireCacheImpl.createRegion(GemFireCacheImpl.java:3169)
      at org.apache.geode.cache.RegionFactory.create(RegionFactory.java:762)
      at org.apache.geode.management.internal.cli.functions.RegionCreateFunction.createRegion(RegionCreateFunction.java:355)
      at org.apache.geode.management.internal.cli.functions.RegionCreateFunction.execute(RegionCreateFunction.java:90)
      at org.apache.geode.internal.cache.execute.AbstractExecution.executeFunctionLocally(AbstractExecution.java:333)
      at org.apache.geode.internal.cache.execute.AbstractExecution$2.run(AbstractExecution.java:303)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      at org.apache.geode.distributed.internal.DistributionManager.runUntilShutdown(DistributionManager.java:621)
      at org.apache.geode.distributed.internal.DistributionManager$9$1.run(DistributionManager.java:1067)
      at java.lang.Thread.run(Thread.java:745)

      //Example Spring Data Redis Object sample
      @Data
      @EqualsAndHashCode()
      @RedisHash(value="companies")
      @NoArgsConstructor
      public class Company
      {
      private @Id String id;
      ....

      //Repository

      public interface CompanyRepository extends CrudRepository<Company, String>
      {
      ....
      }

      //When saving using a repository
      repository.save(this.myCompany);

      [Same Server error]

      java.lang.IllegalArgumentException: Region names may only be alphanumeric and may contain hyphens or underscores: companies:f05405c2-86f2-4aaf-bd0c-6fecd483bf28
      at org.apache.geode.internal.cache.LocalRegion.validateRegionName(LocalRegion.java:7618)
      at org.apache.geode.internal.cache.GemFireCacheImpl.createVMRegion(GemFireCacheImpl.java:3201)
      at org.apache.geode.internal.cache.GemFireCacheImpl.basicCreateRegion(GemFireCacheImpl.java:3181)
      at org.apache.geode.internal.cache.GemFireCacheImpl.createRegion(GemFireCacheImpl.java:3169)
      at org.apache.geode.cache.RegionFactory.create(RegionFactory.java:762)
      at org.apache.geode.management.internal.cli.functions.RegionCreateFunction.createRegion(RegionCreateFunction.java:355)
      at org.apache.geode.management.internal.cli.functions.RegionCreateFunction.execute(RegionCreateFunction.java:90)
      at org.apache.geode.internal.cache.execute.AbstractExecution.executeFunctionLocally(AbstractExecution.java:333)
      at org.apache.geode.internal.cache.execute.AbstractExecution$2.run(AbstractExecution.java:303)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      at org.apache.geode.distributed.internal.DistributionManager.runUntilShutdown(DistributionManager.java:621)
      at org.apache.geode.distributed.internal.DistributionManager$9$1.run(DistributionManager.java:1067)
      at java.lang.Thread.run(Thread.java:745)

      Attachments

        Issue Links

          Activity

            People

              hitesh.khamesra Hitesh Khamesra
              ggreen Gregory Green
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: