You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// we set and get counter according below order, to make sure the counter is updated before get_block, and the time of get_block is recorded in the counter.
157
+
// 1. update_wait_worker_timer to make sure the time of waiting for worker thread is recorded in the timer
158
+
// 2. start_scan_cpu_timer to make sure the cpu timer include the time of open and get_block, which is the real cpu time of scanner
159
+
// 3. update_scan_cpu_timer when defer, to make sure the cpu timer include the time of open and get_block, which is the real cpu time of scanner
160
+
// 4. start_wait_worker_timer when defer, to make sure the time of waiting for worker thread is recorded in the timer
161
+
155
162
MonotonicStopWatch max_run_time_watch;
156
163
max_run_time_watch.start();
157
164
scanner->update_wait_worker_timer();
158
165
scanner->start_scan_cpu_timer();
159
166
160
-
// Counter update need prepare successfully, or it maybe core. For example, olap scanner
161
-
// will open tablet reader during prepare, if not prepare successfully, tablet reader == nullptr.
// WorkloadGroup Policy will check cputime realtime, so that should update the counter
172
-
// as soon as possible, could not update it on close.
173
-
update_scanner_profile();
179
+
if (status.ok() && !eos) {
180
+
// if status is not ok, it means the scanner is failed, and the counter may be not updated correctly, so no need to update counter again. if eos is true, it means the scanner is finished successfully, and the counter is updated correctly, so no need to update counter again.
0 commit comments