Skip to content

Commit

Permalink
Merge pull request #96 from Netflix/bugfix/duet_read_exclude
Browse files Browse the repository at this point in the history
Fix for addAll throwing UnsupportedException in the event it gets applied on top of SingletonList
  • Loading branch information
smadappa authored Oct 8, 2020
2 parents c5c249c + b8c8c03 commit 0e8b973
Showing 1 changed file with 12 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -315,11 +315,13 @@ public List<EVCacheClient> getAllEVCacheClientForRead() {
return evCacheClients;

if (duetPrimary.get()) {
duetEVCacheClients.addAll(evCacheClients);
return duetEVCacheClients;
List<EVCacheClient> clients = new ArrayList<>(duetEVCacheClients);
clients.addAll(evCacheClients);
return clients;
} else {
evCacheClients.addAll(duetEVCacheClients);
return evCacheClients;
List<EVCacheClient> clients = new ArrayList<>(evCacheClients);
clients.addAll(duetEVCacheClients);
return clients;
}
}

Expand Down Expand Up @@ -485,11 +487,13 @@ public List<EVCacheClient> getEVCacheClientsForReadExcluding(ServerGroup serverG
return evCacheClients;

if (duetPrimary.get()) {
duetEVCacheClients.addAll(evCacheClients);
return duetEVCacheClients;
List<EVCacheClient> clients = new ArrayList<>(duetEVCacheClients);
clients.addAll(evCacheClients);
return clients;
} else {
evCacheClients.addAll(duetEVCacheClients);
return evCacheClients;
List<EVCacheClient> clients = new ArrayList<>(evCacheClients);
clients.addAll(duetEVCacheClients);
return clients;
}
}

Expand Down

0 comments on commit 0e8b973

Please sign in to comment.