Fix ArrayIndexOutOfBounds on distributed response
@@ -700,7 +700,9 @@ public class ODistributedResponseManager {
ODistributedServerManager.DB_STATUS.NOT_AVAILABLE);
if (responseGroups.get(0).size() + missingNodes.size() >= quorum) {
- final ODistributedResponse response = responseGroups.get(0).get(0);
+ List<ODistributedResponse> group = responseGroups.get(0);
+ if (group.size() > 0) {
+ final ODistributedResponse response = group.get(0);
if (response != null) {
if (response.getPayload() instanceof Throwable) {
ODistributedServerLog.debug(this, dManager.getLocalNodeName(), null, DIRECTION.NONE,
@@ -716,6 +718,7 @@ public class ODistributedResponseManager {
}
}
}
+ }
} else {
if (receivedResponses >= quorum) {
