Skip to content

Commit

Permalink
Avoid needless allocation
Browse files Browse the repository at this point in the history
Co-authored-by: Ladislav Thon <[email protected]>
  • Loading branch information
MichaelKubovic and Ladicek committed Nov 24, 2023
1 parent c7c66d7 commit b2d4360
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ public Future<Response> send(Request request) {
// can run anywhere
if (REDUCERS.containsKey(cmd)) {
sendToAllSlots(promise, req, cmd, args, forceMasterEndpoint, REDUCERS.get(cmd));
} else if(cmd.equals(SCRIPT) && "LOAD".equalsIgnoreCase(new String(args.get(0)))) {
} else if (cmd.equals(SCRIPT) && args.size() > 1 && args.get(0).length == 4 && "LOAD".equalsIgnoreCase(new String(args.get(0)))) {
sendToAllSlots(promise, req, cmd, args, forceMasterEndpoint, responses -> {
// all nodes should compute the same sha
assert responses.stream().map(Response::toString).collect(Collectors.toSet()).size() == 1;
Expand Down

0 comments on commit b2d4360

Please sign in to comment.