catalog_proc.getName(),
orig_ts.getProcedureParameters().toArray());
spi.setBasePartition(redirect_partition);
spi.setRestartCounter(orig_ts.getRestartCounter()+1);
FastSerializer out = this.outgoingSerializers.get();
try {
out.writeObject(spi);
} catch (IOException ex) {
String msg = "Failed to serialize StoredProcedureInvocation to redirect txn";
throw new ServerFaultException(msg, ex, orig_ts.getTransactionId());
}
RedirectCallback callback;
try {
// callback = (RedirectCallback)objectPools.CALLBACKS_TXN_REDIRECT_REQUEST.borrowObject();
callback = new RedirectCallback(this);
callback.init(orig_ts.getClientCallback());
} catch (Exception ex) {
String msg = "Failed to get TransactionRedirectCallback";
throw new ServerFaultException(msg, ex, orig_ts.getTransactionId());
}
this.hstore_coordinator.transactionRedirect(out.getBytes(),
callback,
redirect_partition);
out.clear();
if (hstore_conf.site.txn_counters) TransactionCounter.REDIRECTED.inc(orig_ts.getProcedure());
return (Status.ABORT_RESTART);
// Allow local redirect
} else if (orig_ts.getRestartCounter() <= 1) {