by

Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Jun 18 2018 10:54
    nathankleyn closed #25
  • May 23 2018 13:22
    fossabot commented #25
  • May 23 2018 13:13
    fossabot opened #25
  • Aug 09 2017 16:51

    nathankleyn on v2.0.1

    (compare)

  • Aug 09 2017 16:51

    nathankleyn on master

    Bump to v2.0.1 with Lua fix. (compare)

  • Aug 09 2017 16:49

    nathankleyn on v2.0.1

    (compare)

  • Aug 09 2017 16:49

    nathankleyn on v2.0.1

    (compare)

  • Aug 09 2017 16:47

    cdagraca on fix-lua-loading

    (compare)

  • Aug 09 2017 16:47

    cdagraca on master

    Make sure loading Lua from reso… Merge pull request #24 from int… (compare)

  • Aug 09 2017 16:47
    cdagraca closed #24
  • Aug 09 2017 16:38
    nathankleyn synchronize #24
  • Aug 09 2017 16:38

    nathankleyn on fix-lua-loading

    Make sure loading Lua from reso… (compare)

  • Aug 09 2017 16:15
    nathankleyn commented #24
  • Aug 09 2017 16:10

    nathankleyn on fix-lua-loading

    Make sure loading Lua from reso… (compare)

  • Aug 09 2017 16:10
    nathankleyn synchronize #24
  • Aug 09 2017 14:44
    nathankleyn commented #24
  • Aug 09 2017 14:34
    nathankleyn opened #24
  • Aug 09 2017 13:31

    nathankleyn on fix-lua-loading

    Make sure loading Lua from reso… (compare)

  • Aug 09 2017 13:30

    nathankleyn on fix-lua-loading

    Make sure loading Lua from reso… (compare)

  • Aug 09 2017 10:22

    nathankleyn on v2.0.0

    (compare)

Maciej Ciołek
@maciekciolek
Hello I would like ask if it is possible to override lua`s redis keys which are used for ID generation. Suppose that we have one redis, but we want to support ID generation for more than one resource?
Albert Pastrana
@albertpastrana

Hi Maciej, not sure if I’ve understood correctly, but I guess you mean overriding these keys:
local lock_key = 'icicle-generator-lock' local sequence_key = 'icicle-generator-sequence' local logical_shard_id_key = 'icicle-generator-logical-shard-id’

So you can generate different ids for persons and things.

With the current implementation that’s not possible. It would be possible using some kind of string interpolation in the lua script and adding a key parameter in the IcicleGenerator class.

To be completely honest, we don’t see a use case for that, as you can use the same generated ids for different resouces, they are always a long and they are always sorted, but besides that, you shouldn’t worry about the value and you can use the ids in different resources (as we are actually doing, for example).

What’s the use case or reasoning behind that?

Maciej Ciołek
@maciekciolek
Hi Albert, thanks for your response and you are totally right that there is no need to create different instances per resources. I was just curious if it is possible and how are you solving this problem :)
Albert Pastrana
@albertpastrana
:)
Maciej Ciołek
@maciekciolek
@albertpastrana we have problems while using icicle. Our redis version is: Redis server v=3.2.6 sha=00000000:0 malloc=jemalloc-4.0.3 bits=64 build=cfd86f96f3fe2d57, we have only one shard. When icicle-generator-sequence reaches 4094 and next requests come to redis it is not reseting to 0 but becomes 4104. There are the logs from redis-cli monitor: http://pastebin.com/eZkhHAj0.
Do you have any ideas what is going on here, which redis version are you using in your environment?
Albert Pastrana
@albertpastrana
@maciekciolek hey, sorry but not sure what this can be, would need to look into it. In production we are using Redis server v=2.8.4 sha=00000000:0 malloc=jemalloc-3.4.1 bits=64 build=a44a05d76f06a5d9 so that might be it?
Maciej Ciołek
@maciekciolek
@albertpastrana ok, I will try with 2.8.X and let you know how is it going :)
Albert Pastrana
@albertpastrana
:+1:
Maciej Ciołek
@maciekciolek

@albertpastrana I checked it and:

  1. Works on 2.8
  2. Does not work on 3.2
  3. Tried to use the newest Jedis - does not work

So, I get into lua script and it fails on Redis's logging commands, when I removed them, everything was all right. I am gona to take a look closer, but it look like internal Redis problem :(

Nathan Kleyn
@nathankleyn

Hey @maciekciolek! I just independently confirmed the same thing on my end. I'm aiming to publish a new release this week which will be v2.0.0 with update dependencies and a reliance on Redis >= 3.0 to solve this problem.

Basically, it's because the logging levels were renamed, LOG_INFO becomes LOG_NOTICE in >= 3.0. :cry:
Keep an eye on the repo for a new release sometime this week!

Maciej Ciołek
@maciekciolek
Great, thanks a lot for your time and that you get into it and provide fixes. Oh, it is a little weird that they renamed it without leaving any alias support :worried:
Nathan Kleyn
@nathankleyn
@maciekciolek just to keep you posted, with more testing we discovered we can make it work for 2.x and 3.x with that same change to the log levels. will land in master shortly, hope to publish by the end of the week :+1:
thanks again for notifying us of the issue, really great to have this fixed!
Maciej Ciołek
@maciekciolek
Great to hear this good news ;) !
John O'Conner
@joconner
New to icicle, redis, and lua...sorry. As I began to research how to generate unique ids in a distributed sys, I found this community! And I of course have questions. I had a basic question that neither the github project readme nor any other doc (so far) seems to answer. That is: why is redis used in this? If the goal is to create unique ids but not to store anything with those ids in the id generation system, why would a memory storage be required?
If the generation of ids is the primary goal, what does redis bring to the solution?