impala-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tim Armstrong (Code Review)" <ger...@cloudera.org>
Subject [Impala-ASF-CR] IMPALA-5031: unsafe random number generation in buffer-pool-test
Date Sat, 05 Aug 2017 00:00:58 GMT
Tim Armstrong has posted comments on this change.

Change subject: IMPALA-5031: unsafe random number generation in buffer-pool-test
......................................................................


Patch Set 1:

(1 comment)

http://gerrit.cloudera.org:8080/#/c/7596/1/be/src/testutil/rand-util.h
File be/src/testutil/rand-util.h:

PS1, Line 34:   static void SeedRng(const char* env_var, std::mt19937* rng) {
            :     const char* seed_str = getenv(env_var);
            :     int64_t seed;
            :     if (seed_str != nullptr) {
            :       seed = atoi(seed_str);
            :     } else {
            :       seed = time(nullptr);
            :     }
            :     LOG(INFO) << "Random seed (overridable with " << env_var <<
"): " << seed;
            :     rng->seed(seed);
            :   }
> Why not change this to use std::random_device instead?
Done


-- 
To view, visit http://gerrit.cloudera.org:8080/7596
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I0eb3bec152a58d9ec39413780cb2c431dd8d4fa8
Gerrit-PatchSet: 1
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-Owner: Tim Armstrong <tarmstrong@cloudera.com>
Gerrit-Reviewer: Jim Apple <jbapple-impala@apache.org>
Gerrit-Reviewer: Sailesh Mukil <sailesh@cloudera.com>
Gerrit-Reviewer: Tim Armstrong <tarmstrong@cloudera.com>
Gerrit-HasComments: Yes

Mime
View raw message