@Override synchronized void logErrorAndReattemptRead(int bookieIndex, BookieSocketAddress host, String errMsg, int rc) { super.logErrorAndReattemptRead(bookieIndex, host, errMsg, rc); int replica = getReplicaIndex(bookieIndex); if (replica == NOT_FOUND) { LOG.error("Received error from a host which is not in the ensemble {} {}.", host, ensemble); return; } if (BKException.Code.OK == rc) { emptyResponseReplicas.set(replica); } else { erroredReplicas.set(replica); } if (!readsOutstanding()) { sendNextRead(); } }
rCtx.getBookieAddress(), lastAddConfirmed); request.logErrorAndReattemptRead(rCtx.getBookieIndex(), bookie, "Empty Response", rc); requestComplete.set(true); } else { request.logErrorAndReattemptRead(rCtx.getBookieIndex(), bookie, "Error: " + BKException.getMessage(rc), rc); return;
content = lh.getDigestManager().verifyDigestAndReturnData(entryId, buffer); } catch (BKException.BKDigestMatchException e) { logErrorAndReattemptRead(bookieIndex, host, "Mac mismatch", BKException.Code.DigestMatchException); return false;
@Override synchronized void logErrorAndReattemptRead(int bookieIndex, BookieSocketAddress host, String errMsg, int rc) { super.logErrorAndReattemptRead(bookieIndex, host, errMsg, rc); --numPendings; // if received all responses or this entry doesn't meet quorum write, complete the request. if (numMissedEntryReads > maxMissedReadsAllowed || numPendings == 0) { if (BKException.Code.BookieHandleNotAvailableException == firstError && numMissedEntryReads > maxMissedReadsAllowed) { firstError = BKException.Code.NoSuchEntryException; } fail(firstError); } }