Skip to content

"Can't open file /dev/urandom" under high throughput environment  #1

Open

Description

@chalianwar

Thank you so much for the project.

There is one issue that I found while playing around, i.e., I get following error under high throughput environment:
"Can't open file /dev/urandom"

Workaround:
sds CRedLock::GetUniqueLockId() {
uuid_t uu;
uuid_generate(uu);
char buffer[37];
uuid_unparse(uu, buffer);
sds s;
s = sdsempty();
for (int i = 0; i < 20; i++) {
s = sdscatprintf(s, "%02X", buffer[i]);
}
return s;
}

Activity

  1. jacket-code commented on Jul 26, 2016

    @jacket-code
    Owner

    i will fix it in next version, or you can use some rand number to replace it

  2. chalianwar commented on Jul 31, 2016

    @chalianwar
    Author

    Yes, using libuuid solved the issue for me.

  3. jacket-code commented on Aug 8, 2016

    @jacket-code
    Owner

    it is too big, i think using redisLrand48() from redis will be better

  4. chalianwar commented on Sep 1, 2016

    @chalianwar
    Author

    Sure, I will switch. Do you think it will it affect the performance?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions