Improve unique id performance (#1911)
Remove the default constructor for UniqueID Add a gen_uid method in UniqueId. If need to generate a new uid, users should call this api explicitly. Reuse boost random generator not generate a new one every time.
This commit is contained in:
@ -48,7 +48,7 @@ Status KafkaDataConsumer::init(StreamLoadContext* ctx) {
|
||||
|
||||
std::stringstream ss;
|
||||
ss << BackendOptions::get_localhost() << "_";
|
||||
std::string group_id = ss.str() + UniqueId().to_string();
|
||||
std::string group_id = ss.str() + UniqueId::gen_uid().to_string();
|
||||
LOG(INFO) << "init kafka consumer with group id: " << group_id;
|
||||
|
||||
std::string errstr;
|
||||
|
||||
Reference in New Issue
Block a user