Hi,
For a while my luminous build error out, but only now I have time to
look at them
Luminous contains:
home/jenkins/workspace/ceph-luminous/src/osd/OSD.cc:2058:34: error: non-constant-expression cannot be narrowed from type 'int' to 'std::__1::linear_congruential_engine<unsigned int, 48271, 0, 2147483647>::result_type' (aka 'unsigned int') in initializer list [-Wc++11-narrowing]
std::default_random_engine rng{whoami};
^~~~~~
/home/jenkins/workspace/ceph-luminous/src/osd/OSD.cc:2058:34: note: insert an explicit cast to silence this issue
std::default_random_engine rng{whoami};
^~~~~~
static_cast<result_type>( )
1 error generated.
And the code:
double OSD::get_tick_interval() const
{
// vary +/- 5% to avoid scrub scheduling livelocks
constexpr auto delta = 0.05;
std::default_random_engine rng{whoami};
return (OSD_TICK_INTERVAL *
std::uniform_real_distribution<>{1.0 - delta, 1.0 + delta}(rng));
}
Now Mimic does not have the initializer for the random engine:
double OSD::get_tick_interval() const
{
// vary +/- 5% to avoid scrub scheduling livelocks
constexpr auto delta = 0.05;
return (OSD_TICK_INTERVAL *
ceph::util::generate_random_number(1.0 - delta, 1.0 + delta));
}
So can we get the Mimic code in Luminous as well??
--WjW