Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

YQ-2302: read_max_bytes bypasses file_size_limit #4117

Merged
merged 4 commits into from
May 27, 2024

Conversation

alchizhevsky
Copy link
Contributor

  • Bugfix

@alchizhevsky alchizhevsky requested a review from a team as a code owner April 25, 2024 15:59
Copy link

github-actions bot commented Apr 25, 2024

2024-04-25 16:02:38 UTC Pre-commit check for 417fb06 has started.
2024-04-25 16:02:41 UTC Build linux-x86_64-release-asan is running...
🟢 2024-04-25 16:04:33 UTC Build successful.
2024-04-25 16:06:14 UTC Tests are running...
🔴 2024-04-25 17:48:19 UTC Some tests failed, follow the links below.

Test history

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
8988 8854 0 36 74 24

Copy link

github-actions bot commented Apr 25, 2024

2024-04-25 16:02:45 UTC Pre-commit check for 417fb06 has started.
2024-04-25 16:02:47 UTC Build linux-x86_64-release-clang14 is running...
🔴 2024-04-25 16:06:04 UTC Build failed. see the build logs.

Copy link

github-actions bot commented Apr 25, 2024

2024-04-25 16:03:43 UTC Pre-commit check for 417fb06 has started.
2024-04-25 16:03:45 UTC Build linux-x86_64-relwithdebinfo is running...
🟢 2024-04-25 16:05:39 UTC Build successful.
2024-04-25 16:07:21 UTC Tests are running...
🔴 2024-04-25 17:41:21 UTC Some tests failed, follow the links below.

Test history

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
36085 30760 0 51 5255 19

Copy link

github-actions bot commented Apr 25, 2024

2024-04-25 17:57:59 UTC Pre-commit check for b8b6a6a has started.
2024-04-25 17:58:01 UTC Build linux-x86_64-release-asan is running...
🟢 2024-04-25 17:59:57 UTC Build successful.
2024-04-25 18:01:42 UTC Tests are running...
🔴 2024-04-25 19:42:31 UTC Some tests failed, follow the links below.

Test history

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
8994 8829 0 33 108 24

Copy link

github-actions bot commented Apr 25, 2024

2024-04-25 17:58:24 UTC Pre-commit check for b8b6a6a has started.
2024-04-25 17:58:26 UTC Build linux-x86_64-release-clang14 is running...
🟢 2024-04-25 18:00:21 UTC Build successful.

Copy link

github-actions bot commented Apr 25, 2024

2024-04-25 18:00:02 UTC Pre-commit check for b8b6a6a has started.
2024-04-25 18:00:05 UTC Build linux-x86_64-relwithdebinfo is running...
🟢 2024-04-25 18:01:55 UTC Build successful.
2024-04-25 18:03:40 UTC Tests are running...
🔴 2024-04-25 19:39:16 UTC Some tests failed, follow the links below.

Test history

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
36089 30696 0 113 5258 22

Copy link

github-actions bot commented Apr 26, 2024

2024-04-26 11:04:12 UTC Pre-commit check for 1b98ee8 has started.
2024-04-26 11:04:15 UTC Build linux-x86_64-release-clang14 is running...
🟢 2024-04-26 11:38:28 UTC Build successful.

Copy link

github-actions bot commented Apr 26, 2024

2024-04-26 11:04:22 UTC Pre-commit check for 1b98ee8 has started.
2024-04-26 11:04:24 UTC Build linux-x86_64-release-asan is running...
🟢 2024-04-26 11:24:15 UTC Build successful.
2024-04-26 11:25:56 UTC Tests are running...
🔴 2024-04-26 13:07:03 UTC Some tests failed, follow the links below.

Test history

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
8999 8826 0 35 109 29

Copy link

github-actions bot commented Apr 26, 2024

2024-04-26 11:04:27 UTC Pre-commit check for 1b98ee8 has started.
2024-04-26 11:04:29 UTC Build linux-x86_64-relwithdebinfo is running...
🟢 2024-04-26 11:23:45 UTC Build successful.
2024-04-26 11:25:31 UTC Tests are running...
🔴 2024-04-26 13:01:09 UTC Some tests failed, follow the links below.

Test history

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
36087 30792 0 7 5259 29

Copy link

github-actions bot commented Apr 26, 2024

2024-04-26 15:00:31 UTC Pre-commit check for b844e96 has started.
2024-04-26 15:00:33 UTC Build linux-x86_64-release-clang14 is running...
🟢 2024-04-26 15:05:48 UTC Build successful.

Copy link

github-actions bot commented Apr 26, 2024

2024-04-26 15:00:40 UTC Pre-commit check for b844e96 has started.
2024-04-26 15:00:43 UTC Build linux-x86_64-release-asan is running...
🟢 2024-04-26 15:02:37 UTC Build successful.
2024-04-26 15:04:22 UTC Tests are running...
🔴 2024-04-26 16:43:52 UTC Some tests failed, follow the links below.

Test history

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
8999 8860 0 21 109 9

Copy link

github-actions bot commented Apr 26, 2024

2024-04-26 15:00:48 UTC Pre-commit check for b844e96 has started.
2024-04-26 15:00:51 UTC Build linux-x86_64-relwithdebinfo is running...
🟢 2024-04-26 15:02:48 UTC Build successful.
2024-04-26 15:04:34 UTC Tests are running...
🔴 2024-04-26 16:43:03 UTC Some tests failed, follow the links below.

Test history

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
36086 30822 0 4 5255 5

Copy link

github-actions bot commented Apr 27, 2024

2024-04-27 16:06:08 UTC Pre-commit check for 708eb98 has started.
2024-04-27 16:06:10 UTC Build linux-x86_64-relwithdebinfo is running...
🟢 2024-04-27 16:08:04 UTC Build successful.
2024-04-27 16:09:48 UTC Tests are running...
🔴 2024-04-27 17:48:03 UTC Some tests failed, follow the links below.

Test history

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
36105 30823 0 10 5266 6

Copy link

github-actions bot commented Apr 27, 2024

2024-04-27 16:06:19 UTC Pre-commit check for 708eb98 has started.
2024-04-27 16:06:22 UTC Build linux-x86_64-release-asan is running...
🟢 2024-04-27 16:08:24 UTC Build successful.
2024-04-27 16:10:10 UTC Tests are running...
🔴 2024-04-27 17:53:59 UTC Some tests failed, follow the links below.

Test history

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
9008 8849 0 34 117 8

Copy link

github-actions bot commented Apr 27, 2024

2024-04-27 16:07:08 UTC Pre-commit check for 708eb98 has started.
2024-04-27 16:07:11 UTC Build linux-x86_64-release-clang14 is running...
🟢 2024-04-27 16:16:11 UTC Build successful.

@@ -3516,9 +3526,13 @@ std::pair<NYql::NDq::IDqComputeActorAsyncInput*, IActor*> CreateS3ReadActor(

#undef SET_FLAG
#undef SUPPORTED_FLAGS
ui64 sizeLimit = std::numeric_limits<ui64>::max();
if (const auto it = settings.find("sizeLimit"); settings.cend() != it)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Тело if заключай в фигурные скобки

@@ -485,12 +485,18 @@ class TS3DqIntegration: public TDqIntegrationBase {

YQL_CLOG(DEBUG, ProviderS3) << " hasDirectories=" << hasDirectories << ", consumersCount=" << consumersCount;

ui64 readLimit = std::numeric_limits<ui64>::max();
if (srcDesc.MutableSettings()->find("sizeLimit") != srcDesc.MutableSettings()->cend()) {
readLimit = FromString<ui64>(srcDesc.MutableSettings()->at("sizeLimit"));
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Перейди на итератор, чтобы поиск ключа делался один раз, а не два

Copy link

github-actions bot commented May 2, 2024

2024-05-02 13:24:27 UTC Pre-commit check for c060708 has started.
2024-05-02 13:24:28 UTC Build linux-x86_64-release-clang14 is running...
🟢 2024-05-02 13:26:03 UTC Build successful.

Copy link

github-actions bot commented May 2, 2024

2024-05-02 13:25:10 UTC Pre-commit check for c060708 has started.
2024-05-02 13:25:13 UTC Build linux-x86_64-release-asan is running...
🟢 2024-05-02 13:27:12 UTC Build successful.
2024-05-02 13:28:54 UTC Tests are running...
🔴 2024-05-02 15:11:34 UTC Some tests failed, follow the links below.

Test history

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
9018 8902 0 31 75 10

Copy link

github-actions bot commented May 2, 2024

2024-05-02 13:25:17 UTC Pre-commit check for c060708 has started.
2024-05-02 13:25:20 UTC Build linux-x86_64-relwithdebinfo is running...
🟢 2024-05-02 13:27:16 UTC Build successful.
2024-05-02 13:28:58 UTC Tests are running...
🔴 2024-05-02 15:02:39 UTC Some tests failed, follow the links below.

Test history

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
36140 30913 0 5 5215 7

objectPath.SetPathIndex(CurrentDirectoryPathIndex);
Objects.emplace_back(std::move(objectPath));
ObjectsTotalSize += object.Size;
ObjectsTotalSize += std::min(object.Size, ReadLimit);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

копипаста выражения. или в переменную положи или вытащи через objectPath.GetSize();

@@ -245,13 +252,13 @@ class TS3LogicalOptProposalTransformer : public TOptimizeTransformerBase {
UnpackPathsList(packed, isTextEncoded, paths);

for (auto& entry : paths) {
if (entry.Size > fileSizeLimit) {
if (std::min(entry.Size, userSizeLimit) > fileSizeLimit) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

постарайся избавиться от копирования выражения с std::min

result = result_set.rows[0].items[0].bytes_value
assert result == info.encode()[:limit]
if kikimr_params.param['raw'] < min(len(info), limit):
client.wait_query_status(query_id, fq.QueryMeta.FAILED)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

сделай один вызов wait_query_status. и expected_status посчитай на основании выражения

Copy link

github-actions bot commented May 3, 2024

2024-05-03 16:04:48 UTC Pre-commit check for a450c7b has started.
2024-05-03 16:04:49 UTC Build linux-x86_64-release-clang14 is running...
🟢 2024-05-03 16:06:28 UTC Build successful.

Copy link

github-actions bot commented May 3, 2024

2024-05-03 16:05:34 UTC Pre-commit check for a450c7b has started.
2024-05-03 16:05:37 UTC Build linux-x86_64-relwithdebinfo is running...
🟢 2024-05-03 16:07:30 UTC Build successful.
2024-05-03 16:09:12 UTC Tests are running...
🔴 2024-05-03 17:40:25 UTC Some tests failed, follow the links below.

Test history

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
36153 30920 0 5 5217 11

Copy link

github-actions bot commented May 3, 2024

2024-05-03 16:05:36 UTC Pre-commit check for a450c7b has started.
2024-05-03 16:05:39 UTC Build linux-x86_64-release-asan is running...
🟢 2024-05-03 16:07:39 UTC Build successful.
2024-05-03 16:09:24 UTC Tests are running...
🔴 2024-05-03 17:56:21 UTC Some tests failed, follow the links below.

Test history

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
9032 8915 0 27 76 14

@alchizhevsky alchizhevsky requested a review from uzhastik May 6, 2024 13:13
@Hor911 Hor911 merged commit 0964dfd into ydb-platform:main May 27, 2024
3 of 5 checks passed
Hor911 pushed a commit to Hor911/ydb that referenced this pull request May 28, 2024
Hor911 pushed a commit to Hor911/ydb that referenced this pull request May 28, 2024
Hor911 pushed a commit to Hor911/ydb that referenced this pull request May 28, 2024
Hor911 pushed a commit to Hor911/ydb that referenced this pull request May 28, 2024
@niksaveliev niksaveliev mentioned this pull request May 29, 2024
@StekPerepolnen StekPerepolnen mentioned this pull request May 31, 2024
@niksaveliev niksaveliev mentioned this pull request Jun 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants