Skip to content

Commit 8727325

Browse files
committed
save
1 parent 63bd993 commit 8727325

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

be/src/agent/task_worker_pool.cpp

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1026,7 +1026,6 @@ void update_tablet_meta_callback(StorageEngine& engine, const TAgentTaskRequest&
10261026
rowset_meta->tablet_schema()->set_skip_write_index_on_load(
10271027
tablet_meta_info.skip_write_index_on_load);
10281028
}
1029-
tablet->tablet_schema_unlocked()->set_skip_write_index_on_load(
10301029
tablet_meta_info.skip_write_index_on_load);
10311030
need_to_save = true;
10321031
}
@@ -1277,10 +1276,9 @@ void report_tablet_callback(CloudStorageEngine& engine, const ClusterInfo* clust
12771276
"WorkPoolCloudReportTablet.report_tablet_callback.skip"))) {
12781277
LOG(WARNING) << "report version " << report_version << " change to " << s_report_version;
12791278
DorisMetrics::instance()->report_all_tablets_requests_skip->increment(1);
1279+
int64_t expected = 0;
12801280
int64_t current_time = time(nullptr);
1281-
if (s_tablet_report_failure_start_time.load() == 0) {
1282-
s_tablet_report_failure_start_time.store(current_time);
1283-
}
1281+
s_tablet_report_failure_start_time.compare_exchange_strong(expected, current_time);
12841282
DorisMetrics::instance()->tablet_report_continuous_failure_duration_s->set_value(
12851283
current_time - s_tablet_report_failure_start_time);
12861284
return;
@@ -1293,10 +1291,9 @@ void report_tablet_callback(CloudStorageEngine& engine, const ClusterInfo* clust
12931291
report_tablet_total << 1;
12941292
if (!succ) [[unlikely]] {
12951293
report_tablet_failed << 1;
1294+
int64_t expected = 0;
12961295
int64_t current_time = time(nullptr);
1297-
if (s_tablet_report_failure_start_time.load() == 0) {
1298-
s_tablet_report_failure_start_time.store(current_time);
1299-
}
1296+
s_tablet_report_failure_start_time.compare_exchange_strong(expected, current_time);
13001297
DorisMetrics::instance()->tablet_report_continuous_failure_duration_s->set_value(
13011298
current_time - s_tablet_report_failure_start_time);
13021299
} else {

0 commit comments

Comments
 (0)