public void close() { try { FBUtilities.waitOnFutures(repairResults, DatabaseDescriptor.getWriteRpcTimeout()); } catch (TimeoutException ex) { // We got all responses, but timed out while repairing int blockFor = consistency.blockFor(keyspace); if (Tracing.isTracing()) Tracing.trace("Timed out while read-repairing after receiving all {} data and digest responses", blockFor); else logger.debug("Timeout while read-repairing after receiving all {} data and digest responses", blockFor); throw new ReadTimeoutException(consistency, blockFor-1, blockFor, true); } }
public TResolved get() throws ReadTimeoutException, DigestMismatchException { if (!await(command.getTimeout(), TimeUnit.MILLISECONDS)) { // Same as for writes, see AbstractWriteResponseHandler ReadTimeoutException ex = new ReadTimeoutException(consistencyLevel, received, blockfor, resolver.isDataPresent()); Tracing.trace("Read timeout: {}", ex.toString()); if (logger.isDebugEnabled()) logger.debug("Read timeout: {}", ex.toString()); throw ex; } return blockfor == 1 ? resolver.getData() : resolver.resolve(); }
public void close() { try { FBUtilities.waitOnFutures(repairResults, DatabaseDescriptor.getWriteRpcTimeout()); } catch (TimeoutException ex) { // We got all responses, but timed out while repairing int blockFor = consistency.blockFor(keyspace); if (Tracing.isTracing()) Tracing.trace("Timed out while read-repairing after receiving all {} data and digest responses", blockFor); else logger.debug("Timeout while read-repairing after receiving all {} data and digest responses", blockFor); throw new ReadTimeoutException(consistency, blockFor-1, blockFor, true); } }
public void close() { try { FBUtilities.waitOnFutures(repairResults, DatabaseDescriptor.getWriteRpcTimeout()); } catch (TimeoutException ex) { // We got all responses, but timed out while repairing int blockFor = consistency.blockFor(keyspace); if (Tracing.isTracing()) Tracing.trace("Timed out while read-repairing after receiving all {} data and digest responses", blockFor); else logger.debug("Timeout while read-repairing after receiving all {} data and digest responses", blockFor); throw new ReadTimeoutException(consistency, blockFor-1, blockFor, true); } }
void maybeAwaitFullDataRead() throws ReadTimeoutException { // There wasn't a digest mismatch, we're good if (repairHandler == null) return; // Otherwise, get the result from the full-data read and check that it's not a short read try { result = repairHandler.get(); } catch (DigestMismatchException e) { throw new AssertionError(e); // full data requested from each node here, no digests should be sent } catch (ReadTimeoutException e) { if (Tracing.isTracing()) Tracing.trace("Timed out waiting on digest mismatch repair requests"); else logger.trace("Timed out waiting on digest mismatch repair requests"); // the caught exception here will have CL.ALL from the repair command, // not whatever CL the initial command was at (CASSANDRA-7947) int blockFor = consistency.blockFor(Keyspace.open(command.metadata().ksName)); throw new ReadTimeoutException(consistency, blockFor-1, blockFor, true); } }
throw new ReadTimeoutException(consistencyLevel, 0, consistencyLevel.blockFor(Keyspace.open(metadata.ksName)), false);
throw new ReadTimeoutException(consistencyLevel, 0, consistencyLevel.blockFor(Keyspace.open(metadata.ksName)), false);
throw new ReadTimeoutException(consistencyLevel, 0, consistencyLevel.blockFor(Keyspace.open(metadata.ksName)), false);
void maybeAwaitFullDataRead() throws ReadTimeoutException { // There wasn't a digest mismatch, we're good if (repairHandler == null) return; // Otherwise, get the result from the full-data read and check that it's not a short read try { result = repairHandler.get(); } catch (DigestMismatchException e) { throw new AssertionError(e); // full data requested from each node here, no digests should be sent } catch (ReadTimeoutException e) { if (Tracing.isTracing()) Tracing.trace("Timed out waiting on digest mismatch repair requests"); else logger.trace("Timed out waiting on digest mismatch repair requests"); // the caught exception here will have CL.ALL from the repair command, // not whatever CL the initial command was at (CASSANDRA-7947) int blockFor = consistency.blockFor(Keyspace.open(command.metadata().ksName)); throw new ReadTimeoutException(consistency, blockFor-1, blockFor, true); } }
void maybeAwaitFullDataRead() throws ReadTimeoutException { // There wasn't a digest mismatch, we're good if (repairHandler == null) return; // Otherwise, get the result from the full-data read and check that it's not a short read try { result = repairHandler.get(); } catch (DigestMismatchException e) { throw new AssertionError(e); // full data requested from each node here, no digests should be sent } catch (ReadTimeoutException e) { if (Tracing.isTracing()) Tracing.trace("Timed out waiting on digest mismatch repair requests"); else logger.trace("Timed out waiting on digest mismatch repair requests"); // the caught exception here will have CL.ALL from the repair command, // not whatever CL the initial command was at (CASSANDRA-7947) int blockFor = consistency.blockFor(Keyspace.open(command.metadata().ksName)); throw new ReadTimeoutException(consistency, blockFor-1, blockFor, true); } }
public void awaitResults() throws ReadFailureException, ReadTimeoutException { boolean signaled = await(command.getTimeout(), TimeUnit.MILLISECONDS); boolean failed = blockfor + failures > endpoints.size(); if (signaled && !failed) return; if (Tracing.isTracing()) { String gotData = received > 0 ? (resolver.isDataPresent() ? " (including data)" : " (only digests)") : ""; Tracing.trace("{}; received {} of {} responses{}", new Object[]{ (failed ? "Failed" : "Timed out"), received, blockfor, gotData }); } else if (logger.isDebugEnabled()) { String gotData = received > 0 ? (resolver.isDataPresent() ? " (including data)" : " (only digests)") : ""; logger.debug("{}; received {} of {} responses{}", new Object[]{ (failed ? "Failed" : "Timed out"), received, blockfor, gotData }); } // Same as for writes, see AbstractWriteResponseHandler throw failed ? new ReadFailureException(consistencyLevel, received, blockfor, resolver.isDataPresent(), failureReasonByEndpoint) : new ReadTimeoutException(consistencyLevel, received, blockfor, resolver.isDataPresent()); }
public void awaitResults() throws ReadFailureException, ReadTimeoutException { boolean signaled = await(command.getTimeout(), TimeUnit.MILLISECONDS); boolean failed = blockfor + failures > endpoints.size(); if (signaled && !failed) return; if (Tracing.isTracing()) { String gotData = received > 0 ? (resolver.isDataPresent() ? " (including data)" : " (only digests)") : ""; Tracing.trace("{}; received {} of {} responses{}", new Object[]{ (failed ? "Failed" : "Timed out"), received, blockfor, gotData }); } else if (logger.isDebugEnabled()) { String gotData = received > 0 ? (resolver.isDataPresent() ? " (including data)" : " (only digests)") : ""; logger.debug("{}; received {} of {} responses{}", new Object[]{ (failed ? "Failed" : "Timed out"), received, blockfor, gotData }); } // Same as for writes, see AbstractWriteResponseHandler throw failed ? new ReadFailureException(consistencyLevel, received, blockfor, resolver.isDataPresent(), failureReasonByEndpoint) : new ReadTimeoutException(consistencyLevel, received, blockfor, resolver.isDataPresent()); }
public void awaitResults() throws ReadFailureException, ReadTimeoutException { boolean signaled = await(command.getTimeout(), TimeUnit.MILLISECONDS); boolean failed = blockfor + failures > endpoints.size(); if (signaled && !failed) return; if (Tracing.isTracing()) { String gotData = received > 0 ? (resolver.isDataPresent() ? " (including data)" : " (only digests)") : ""; Tracing.trace("{}; received {} of {} responses{}", new Object[]{ (failed ? "Failed" : "Timed out"), received, blockfor, gotData }); } else if (logger.isDebugEnabled()) { String gotData = received > 0 ? (resolver.isDataPresent() ? " (including data)" : " (only digests)") : ""; logger.debug("{}; received {} of {} responses{}", new Object[]{ (failed ? "Failed" : "Timed out"), received, blockfor, gotData }); } // Same as for writes, see AbstractWriteResponseHandler throw failed ? new ReadFailureException(consistencyLevel, received, blockfor, resolver.isDataPresent(), failureReasonByEndpoint) : new ReadTimeoutException(consistencyLevel, received, blockfor, resolver.isDataPresent()); }
private static TransportException getBackwardsCompatibleException(ErrorMessage msg, ProtocolVersion version) { if (version.isSmallerThan(ProtocolVersion.V4)) { switch (msg.error.code()) { case READ_FAILURE: ReadFailureException rfe = (ReadFailureException) msg.error; return new ReadTimeoutException(rfe.consistency, rfe.received, rfe.blockFor, rfe.dataPresent); case WRITE_FAILURE: WriteFailureException wfe = (WriteFailureException) msg.error; return new WriteTimeoutException(wfe.writeType, wfe.consistency, wfe.received, wfe.blockFor); case FUNCTION_FAILURE: return new InvalidRequestException(msg.toString()); } } return msg.error; }
private static TransportException getBackwardsCompatibleException(ErrorMessage msg, ProtocolVersion version) { if (version.isSmallerThan(ProtocolVersion.V4)) { switch (msg.error.code()) { case READ_FAILURE: ReadFailureException rfe = (ReadFailureException) msg.error; return new ReadTimeoutException(rfe.consistency, rfe.received, rfe.blockFor, rfe.dataPresent); case WRITE_FAILURE: WriteFailureException wfe = (WriteFailureException) msg.error; return new WriteTimeoutException(wfe.writeType, wfe.consistency, wfe.received, wfe.blockFor); case FUNCTION_FAILURE: return new InvalidRequestException(msg.toString()); } } return msg.error; }
private static TransportException getBackwardsCompatibleException(ErrorMessage msg, ProtocolVersion version) { if (version.isSmallerThan(ProtocolVersion.V4)) { switch (msg.error.code()) { case READ_FAILURE: ReadFailureException rfe = (ReadFailureException) msg.error; return new ReadTimeoutException(rfe.consistency, rfe.received, rfe.blockFor, rfe.dataPresent); case WRITE_FAILURE: WriteFailureException wfe = (WriteFailureException) msg.error; return new WriteTimeoutException(wfe.writeType, wfe.consistency, wfe.received, wfe.blockFor); case FUNCTION_FAILURE: return new InvalidRequestException(msg.toString()); } } return msg.error; }
throw new ReadTimeoutException(consistencyLevel, blockFor-1, blockFor, true); logger.debug("Timed out waiting on digest mismatch repair acknowledgements"); int blockFor = consistencyLevel.blockFor(Keyspace.open(command.getKeyspace())); throw new ReadTimeoutException(consistencyLevel, blockFor-1, blockFor, true);
else logger.debug("Range slice timeout while read-repairing after receiving all {} data and digest responses", blockFor); throw new ReadTimeoutException(consistency_level, blockFor-1, blockFor, true);
throw new ReadTimeoutException(consistencyLevel, 0, consistencyLevel.blockFor(Keyspace.open(command.ksName)), false);
throw new ReadTimeoutException(consistency, blockFor - 1, blockFor, true);