@Override public void checkpoint(boolean hasUncommittedData) throws SQLException { if (hasUncommittedData) { try { if (txContext == null) { tx = txServiceClient.checkpoint(tx); } else { assert (txContext != null); txContext.checkpoint(); tx = txContext.getCurrentTransaction(); } } catch (TransactionFailureException e) { throw new SQLException(e); } } // Since we're querying our own table while mutating it, we must exclude // see our current mutations, otherwise we can get erroneous results // (for DELETE) // or get into an infinite loop (for UPSERT SELECT). if (txContext == null) { tx.setVisibility(VisibilityLevel.SNAPSHOT_EXCLUDE_CURRENT); } else { assert (txContext != null); txContext.getCurrentTransaction().setVisibility( VisibilityLevel.SNAPSHOT_EXCLUDE_CURRENT); } }
@Override public Transaction checkpoint(Transaction tx) throws TransactionNotInProgressException { return delegate.checkpoint(tx); }
@Override public Transaction checkpoint(Transaction tx) throws TransactionNotInProgressException { return delegate.checkpoint(tx); }
@Override public Transaction checkpoint(Transaction tx) throws TransactionNotInProgressException { return delegate.checkpoint(tx); }
@Override public Transaction checkpoint(Transaction tx) throws TransactionNotInProgressException { return delegate.checkpoint(tx); }
@Override public Transaction checkpoint(Transaction tx) throws TransactionNotInProgressException { return delegate.checkpoint(tx); }
@Override public Transaction checkpoint(Transaction tx) throws TransactionNotInProgressException { return delegate.checkpoint(tx); }
@Override public Transaction checkpoint(Transaction tx) throws TransactionNotInProgressException { try { return delegate.checkpoint(tx); } catch (RuntimeException e) { throw handleException(e); } }
@Override public Transaction checkpoint(Transaction tx) throws TransactionNotInProgressException { try { return delegate.checkpoint(tx); } catch (RuntimeException e) { throw handleException(e); } }
@Override public void checkpoint() throws TransactionFailureException { Preconditions.checkState(currentTx != null, "Cannot checkpoint tx that has not been started"); persist(); try { currentTx = txClient.checkpoint(currentTx); // update the current transaction with all TransactionAwares for (TransactionAware txAware : getTransactionAwares()) { txAware.updateTx(currentTx); } } catch (TransactionFailureException e) { abort(e); } catch (Throwable e) { abort(new TransactionFailureException( String.format("Exception from checkpoint for transaction %d.", currentTx.getTransactionId()), e)); } }
@Override public void checkpoint() throws TransactionFailureException { Preconditions.checkState(currentTx != null, "Cannot checkpoint tx that has not been started"); persist(); try { currentTx = txClient.checkpoint(currentTx); // update the current transaction with all TransactionAwares for (TransactionAware txAware : getTransactionAwares()) { txAware.updateTx(currentTx); } } catch (TransactionFailureException e) { abort(e); } catch (Throwable e) { abort(new TransactionFailureException( String.format("Exception from checkpoint for transaction %d.", currentTx.getTransactionId()), e)); } }
persist(); try { currentTx = txClient.checkpoint(currentTx);
@Override public void checkpoint(boolean hasUncommittedData) throws SQLException { if (hasUncommittedData) { try { if (txContext == null) { tx = txServiceClient.checkpoint(tx); } else { assert (txContext != null); txContext.checkpoint(); tx = txContext.getCurrentTransaction(); } } catch (TransactionFailureException e) { throw new SQLException(e); } } // Since we're querying our own table while mutating it, we must exclude // see our current mutations, otherwise we can get erroneous results // (for DELETE) // or get into an infinite loop (for UPSERT SELECT). if (txContext == null) { tx.setVisibility(VisibilityLevel.SNAPSHOT_EXCLUDE_CURRENT); } else { assert (txContext != null); txContext.getCurrentTransaction().setVisibility( VisibilityLevel.SNAPSHOT_EXCLUDE_CURRENT); } }
@Override public void checkpoint(boolean hasUncommittedData) throws SQLException { if (hasUncommittedData) { try { if (txContext == null) { tx = txServiceClient.checkpoint(tx); } else { assert (txContext != null); txContext.checkpoint(); tx = txContext.getCurrentTransaction(); } } catch (TransactionFailureException e) { throw new SQLException(e); } } // Since we're querying our own table while mutating it, we must exclude // see our current mutations, otherwise we can get erroneous results // (for DELETE) // or get into an infinite loop (for UPSERT SELECT). if (txContext == null) { tx.setVisibility(VisibilityLevel.SNAPSHOT_EXCLUDE_CURRENT); } else { assert (txContext != null); txContext.getCurrentTransaction().setVisibility( VisibilityLevel.SNAPSHOT_EXCLUDE_CURRENT); } }