@@ -74,7 +74,7 @@ void ExportPartitionTaskScheduler::run()
7474 std::size_t scheduled_exports_count = 0 ;
7575
7676 const uint32_t seed = uint32_t (std::hash<std::string>{}(storage.replica_name )) ^ uint32_t (scheduled_exports_count);
77- std::mt19937 rng (seed);
77+ pcg64_fast rng (seed);
7878
7979 std::lock_guard lock (storage.export_merge_tree_partition_mutex );
8080
@@ -261,6 +261,8 @@ void ExportPartitionTaskScheduler::run()
261261 catch (const Exception &)
262262 {
263263 tryLogCurrentException (__PRETTY_FUNCTION__);
264+ ProfileEvents::increment (ProfileEvents::ExportPartitionZooKeeperRequests);
265+ ProfileEvents::increment (ProfileEvents::ExportPartitionZooKeeperRemove);
264266 zk->tryRemove (fs::path (storage.zookeeper_path ) / " exports" / key / " locks" / zk_part_name);
265267 // / we should not increment retry_count because the node might just be full
266268 }
@@ -417,7 +419,7 @@ void ExportPartitionTaskScheduler::handlePartExportFailure(
417419 zk->tryGet (count_path, num_exceptions_string);
418420 ProfileEvents::increment (ProfileEvents::ExportPartitionZooKeeperRequests);
419421 ProfileEvents::increment (ProfileEvents::ExportPartitionZooKeeperGet);
420- num_exceptions = std::stoull (num_exceptions_string. c_str () );
422+ num_exceptions = parse< size_t > (num_exceptions_string);
421423
422424 ops.emplace_back (zkutil::makeSetRequest (last_exception_path / " part" , part_name, -1 ));
423425 ops.emplace_back (zkutil::makeSetRequest (last_exception_path / " exception" , exception->message (), -1 ));
0 commit comments