diff --git a/build-support/post_install.sh b/build-support/post_install.sh index 51b846daeeaa..f9889d49a77d 100755 --- a/build-support/post_install.sh +++ b/build-support/post_install.sh @@ -152,7 +152,11 @@ if [[ $install_mode == "true" ]]; then exit 1 fi - ln -sfT "$linuxbrew_dir" "$BREW_HOME" + if [[ "$linuxbrew_dir" != "$BREW_HOME" ]]; then + ln -sfT "$linuxbrew_dir" "$BREW_HOME" + else + echo "Skipping linuxbrew symlink, since it already has necessary length: $linuxbrew_dir" + fi # We are relying on the fact that $distribution_dir is not a symlink. We don't want to add symlink # resolution to the find command because someone may accidentally add a symlink pointing to a diff --git a/java/yb-cql/src/test/java/org/yb/cql/TestTransaction.java b/java/yb-cql/src/test/java/org/yb/cql/TestTransaction.java index fede2ffa33d4..1ad54b2520ab 100644 --- a/java/yb-cql/src/test/java/org/yb/cql/TestTransaction.java +++ b/java/yb-cql/src/test/java/org/yb/cql/TestTransaction.java @@ -624,11 +624,11 @@ public void testTimeout() throws Exception { LOG.info("Initial expired transactions = {}", initialExpiredTransactions); try { - thrown.expect(com.datastax.driver.core.exceptions.OperationTimedOutException.class); + thrown.expect(com.datastax.driver.core.exceptions.DriverException.class); session.execute("begin transaction" + " insert into test_timeout (k, v) values (1, 1);" + "end transaction;"); - } catch (com.datastax.driver.core.exceptions.OperationTimedOutException e) { + } catch (com.datastax.driver.core.exceptions.DriverException e) { int currentExpiredTransactions = getExpiredTransactionsCount(); LOG.info("Current expired transactions = {}", currentExpiredTransactions); assertTrue(currentExpiredTransactions > initialExpiredTransactions); diff --git a/src/yb/client/client.cc b/src/yb/client/client.cc index 53df94bcf2be..e8869d198b03 100644 --- a/src/yb/client/client.cc +++ b/src/yb/client/client.cc @@ -471,6 +471,7 @@ Status YBClientBuilder::DoBuild(rpc::Messenger* messenger, std::unique_ptrclient_name_ + "cb"); tpb.set_max_threads(callback_threadpool_size); + tpb.set_min_threads(1); std::unique_ptr tp; RETURN_NOT_OK_PREPEND( tpb.Build(&tp), diff --git a/src/yb/client/transaction.cc b/src/yb/client/transaction.cc index a5167670fbdb..3d38f2b902aa 100644 --- a/src/yb/client/transaction.cc +++ b/src/yb/client/transaction.cc @@ -306,6 +306,16 @@ class YBTransaction::Impl final : public internal::TxnBatcherIf { UNIQUE_LOCK(lock, mutex_); const bool defer = !ready_; + if (!status_.ok()) { + auto status = status_; + lock.unlock(); + VLOG_WITH_PREFIX(2) << "Prepare, transaction already failed: " << status; + if (waiter) { + waiter(status); + } + return false; + } + if (!defer || initial) { Status status = CheckTransactionLocality(ops_info); if (!status.ok()) {