Dennis
02/20/2019, 7:07 PM--table_delay flag which in turn uses the sleepFor() function. I wanted to double-check and get your opinions before opening a bug.
Specifically, the documentation says that --table_delay should "Add a microsecond delay between multiple table calls". In virtual_table.cpp, it's called like this sleepFor(FLAGS_table_delay); but then the actual sleepFor() function expects milliseconds - not microseconds.
inline void sleepFor(size_t msec) {
std::chrono::milliseconds mduration(msec);
std::this_thread::sleep_for(mduration);
}
This means that table_delay is off by a factor of 1000. We had this flag set to 1000 assuming it would be a 1ms delay between scans but instead it's a 1sec delay between scans. With 300 records (E.G. - processes) joined against another table (E.G. - hashes), this causes a 5min delay during query execution which hangs the scheduler pretty badly.
My question is - is the bug that sleepFor(FLAGS_table_delay); should be sleepFor(FLAGS_table_delay/1000); or is the bug that std::chrono::milliseconds should be std::chrono::microseconds?