Fix `ServerStatusService.statusWatchers` concurrent modification. (#12884)

This commit is contained in:
weixiang1862 2024-12-20 20:45:00 +08:00 committed by GitHub
parent e0d64112bc
commit 6d262cce62
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 2 deletions

View File

@ -36,6 +36,7 @@
* BanyanDB: Speed up OAP booting while initializing BanyanDB.
* BanyanDB: Support `@EnableSort` on the column to enable sorting for `IndexRule` and set the default to false.
* Support `Get Effective TTL Configurations` API.
* Fix `ServerStatusService.statusWatchers` concurrent modification.
#### UI

View File

@ -18,8 +18,8 @@
package org.apache.skywalking.oap.server.core.status;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.CopyOnWriteArrayList;
import lombok.Getter;
import lombok.RequiredArgsConstructor;
import org.apache.skywalking.oap.server.core.CoreModuleConfig;
@ -46,7 +46,7 @@ public class ServerStatusService implements Service {
@Getter
private ClusterStatus clusterStatus = new ClusterStatus();
private List<ServerStatusWatcher> statusWatchers = new ArrayList<>();
private List<ServerStatusWatcher> statusWatchers = new CopyOnWriteArrayList<>();
private List<ApplicationConfiguration.ModuleConfiguration> configurations;