Skip to content

Commit

Permalink
[ISSUE #7579] Fix globalWhiteRemoteAddressStrategy cocurrent bug
Browse files Browse the repository at this point in the history
  • Loading branch information
leizhiyuan committed Nov 24, 2023
1 parent cb709bb commit 3a6bf96
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.concurrent.CopyOnWriteArrayList;
import java.util.concurrent.atomic.AtomicLong;

import org.apache.commons.lang3.StringUtils;
Expand Down Expand Up @@ -66,7 +67,7 @@ public class PlainPermissionManager {

private Map<String/** AccessKey **/, String/** fileFullPath **/> accessKeyTable = new HashMap<>();

private List<RemoteAddressStrategy> globalWhiteRemoteAddressStrategy = new ArrayList<>();
private List<RemoteAddressStrategy> globalWhiteRemoteAddressStrategy = new CopyOnWriteArrayList<>();

private RemoteAddressStrategyFactory remoteAddressStrategyFactory = new RemoteAddressStrategyFactory();

Expand Down Expand Up @@ -117,7 +118,7 @@ public void load() {

Map<String, Map<String, PlainAccessResource>> aclPlainAccessResourceMap = new HashMap<>();
Map<String, String> accessKeyTable = new HashMap<>();
List<RemoteAddressStrategy> globalWhiteRemoteAddressStrategy = new ArrayList<>();
List<RemoteAddressStrategy> globalWhiteRemoteAddressStrategy = new CopyOnWriteArrayList<>();
Map<String, List<RemoteAddressStrategy>> globalWhiteRemoteAddressStrategyMap = new HashMap<>();
Map<String, DataVersion> dataVersionMap = new HashMap<>();

Expand Down

0 comments on commit 3a6bf96

Please sign in to comment.