Merge branch 'master' into remove-alter-live-view

This commit is contained in:
Alexey Milovidov 2024-02-26 00:00:28 +01:00
commit 4ae5d78f54
8 changed files with 52 additions and 9 deletions

2
contrib/aws vendored

@ -1 +1 @@
Subproject commit 9eb5097a0abfa837722cca7a5114a25837817bf2
Subproject commit 5f0542b3ad7eef25b0540d37d778207e0345ea8f

View File

@ -387,6 +387,11 @@ if [ -f core.zst ]; then
fi
rg --text -F '<Fatal>' server.log > fatal.log ||:
FATAL_LINK=''
if [ -s fatal.log ]; then
FATAL_LINK='<a href="fatal.log">fatal.log</a>'
fi
dmesg -T > dmesg.log ||:
zstd --threads=0 --rm server.log
@ -419,6 +424,7 @@ p.links a { padding: 5px; margin: 3px; background: #FFF; line-height: 2; white-s
<a href="main.log">main.log</a>
<a href="dmesg.log">dmesg.log</a>
${CORE_LINK}
${FATAL_LINK}
</p>
<table>
<tr>

View File

@ -37,7 +37,7 @@ sudo xcode-select --install
``` bash
brew update
brew install ccache cmake ninja libtool gettext llvm gcc binutils grep findutils
brew install ccache cmake ninja libtool gettext llvm gcc binutils grep findutils nasm
```
## Checkout ClickHouse Sources {#checkout-clickhouse-sources}

View File

@ -10,7 +10,7 @@ Allows to connect to databases on a remote [PostgreSQL](https://www.postgresql.o
Gives the real-time access to table list and table structure from remote PostgreSQL with the help of `SHOW TABLES` and `DESCRIBE TABLE` queries.
Supports table structure modifications (`ALTER TABLE ... ADD|DROP COLUMN`). If `use_table_cache` parameter (see the Engine Parameters below) it set to `1`, the table structure is cached and not checked for being modified, but can be updated with `DETACH` and `ATTACH` queries.
Supports table structure modifications (`ALTER TABLE ... ADD|DROP COLUMN`). If `use_table_cache` parameter (see the Engine Parameters below) is set to `1`, the table structure is cached and not checked for being modified, but can be updated with `DETACH` and `ATTACH` queries.
## Creating a Database {#creating-a-database}

View File

@ -715,7 +715,7 @@ std::string Client::getRegionForBucket(const std::string & bucket, bool force_de
if (outcome.IsSuccess())
{
const auto & result = outcome.GetResult();
region = result.GetRegion();
region = result.GetBucketRegion();
}
else
{

View File

@ -26,6 +26,8 @@
#include <IO/Archives/createArchiveReader.h>
#include <IO/Archives/IArchiveReader.h>
#include <IO/PeekableReadBuffer.h>
#include <IO/AsynchronousReadBufferFromFile.h>
#include <Disks/IO/IOUringReader.h>
#include <Formats/FormatFactory.h>
#include <Formats/ReadSchemaUtils.h>
@ -92,6 +94,7 @@ namespace ErrorCodes
extern const int CANNOT_EXTRACT_TABLE_STRUCTURE;
extern const int CANNOT_DETECT_FORMAT;
extern const int CANNOT_COMPILE_REGEXP;
extern const int UNSUPPORTED_METHOD;
}
namespace
@ -276,6 +279,22 @@ std::unique_ptr<ReadBuffer> selectReadBuffer(
ProfileEvents::increment(ProfileEvents::CreatedReadBufferOrdinary);
}
else if (read_method == LocalFSReadMethod::io_uring && !use_table_fd)
{
#if USE_LIBURING
auto & reader = context->getIOURingReader();
if (!reader.isSupported())
throw Exception(ErrorCodes::UNSUPPORTED_METHOD, "io_uring is not supported by this system");
res = std::make_unique<AsynchronousReadBufferFromFileWithDescriptorsCache>(
reader,
Priority{},
current_path,
context->getSettingsRef().max_read_buffer_size);
#else
throw Exception(ErrorCodes::UNSUPPORTED_METHOD, "Read method io_uring is only supported in Linux");
#endif
}
else
{
if (use_table_fd)

View File

@ -114,6 +114,7 @@ def main():
"report.html": workspace_path / "report.html",
"core.zst": workspace_path / "core.zst",
"dmesg.log": workspace_path / "dmesg.log",
"fatal.log": workspace_path / "fatal.log",
}
compressed_server_log_path = workspace_path / "server.log.zst"

View File

@ -13,7 +13,6 @@ import sys
import os
import os.path
import glob
import platform
import signal
import re
import copy
@ -574,6 +573,27 @@ def get_localzone():
return os.getenv("TZ", "/".join(os.readlink("/etc/localtime").split("/")[-2:]))
def supports_io_uring():
return not subprocess.call(
[
args.binary,
"-q",
"select * from file('/dev/null', 'LineAsString')",
"--storage_file_read_method",
"io_uring",
],
stdout=subprocess.DEVNULL,
stderr=subprocess.DEVNULL,
)
def get_local_filesystem_methods():
methods = ["read", "pread", "mmap", "pread_threadpool"]
if supports_io_uring():
methods.append("io_uring")
return methods
class SettingsRandomizer:
settings = {
"max_insert_threads": lambda: 0
@ -614,10 +634,7 @@ class SettingsRandomizer:
0.2, 0.5, 1, 10 * 1024 * 1024 * 1024
),
"local_filesystem_read_method": lambda: random.choice(
# Allow to use uring only when running on Linux
["read", "pread", "mmap", "pread_threadpool", "io_uring"]
if platform.system().lower() == "linux"
else ["read", "pread", "mmap", "pread_threadpool"]
get_local_filesystem_methods()
),
"remote_filesystem_read_method": lambda: random.choice(["read", "threadpool"]),
"local_filesystem_read_prefetch": lambda: random.randint(0, 1),