diff --git a/docker/test/stress/stress b/docker/test/stress/stress index a81391d56a7..11fc63352d3 100755 --- a/docker/test/stress/stress +++ b/docker/test/stress/stress @@ -30,6 +30,15 @@ def get_options(i): options += " --order=random" if i % 2 == 1: options += " --db-engine=Ordinary" + + # If database name is not specified, new database is created for each functional test. + # Run some threads with one database for all tests. + if i % 3 == 1: + options += " --database=test_{}".format(i) + + if i == 13: + options += " --client-option='memory_tracker_fault_probability=0.00001'" + return options diff --git a/src/Common/Exception.cpp b/src/Common/Exception.cpp index 4dbd685d562..5a19c3b2e9c 100644 --- a/src/Common/Exception.cpp +++ b/src/Common/Exception.cpp @@ -2,6 +2,7 @@ #include #include +#include #include #include #include @@ -36,13 +37,13 @@ namespace ErrorCodes Exception::Exception(const std::string & msg, int code) : Poco::Exception(msg, code) { - // In debug builds, treat LOGICAL_ERROR as an assertion failure. + // In debug builds and builds with sanitizers, treat LOGICAL_ERROR as an assertion failure. // Log the message before we fail. -#ifndef NDEBUG +#if !defined(NDEBUG) || defined(ADDRESS_SANITIZER) || defined(THREAD_SANITIZER) || defined(MEMORY_SANITIZER) || defined(UNDEFINED_BEHAVIOR_SANITIZER) if (code == ErrorCodes::LOGICAL_ERROR) { - LOG_ERROR(&Poco::Logger::root(), "Logical error: '{}'.", msg); - assert(false); + LOG_FATAL(&Poco::Logger::root(), "Logical error: '{}'.", msg); + abort(); } #endif }