Skip to content

Adapt to the blocklist feature in serverless#9578

Merged
ti-chi-bot[bot] merged 20 commits intopingcap:masterfrom
CalvinNeo:adapt-to-master
Nov 7, 2024
Merged

Adapt to the blocklist feature in serverless#9578
ti-chi-bot[bot] merged 20 commits intopingcap:masterfrom
CalvinNeo:adapt-to-master

Conversation

@CalvinNeo
Copy link
Member

Issue Number: close #9575

Problem Summary:

The feature is not enabled on master branch.

See https://github.com/tidbcloud/tiflash-cse/pull/308 for more.

What is changed and how it works?


Check List

Tests

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)
  • No code

Side effects

  • Performance regression: Consumes more CPU
  • Performance regression: Consumes more Memory
  • Breaking backward compatibility

Documentation

  • Affects user behaviors
  • Contains syntax changes
  • Contains variable changes
  • Contains experimental features
  • Changes MySQL compatibility

Release note

None

Signed-off-by: Calvin Neo <calvinneo1995@gmail.com>
Signed-off-by: Calvin Neo <calvinneo1995@gmail.com>
Signed-off-by: Calvin Neo <calvinneo1995@gmail.com>
@ti-chi-bot ti-chi-bot bot added release-note-none Denotes a PR that doesn't merit a release note. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Nov 1, 2024
Signed-off-by: Calvin Neo <calvinneo1995@gmail.com>
@ti-chi-bot ti-chi-bot bot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Nov 1, 2024
Signed-off-by: Calvin Neo <calvinneo1995@gmail.com>
@ti-chi-bot ti-chi-bot bot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Nov 1, 2024
M(SettingUInt64, disagg_build_task_timeout, DEFAULT_DISAGG_TASK_BUILD_TIMEOUT_SEC, "disagg task establish timeout, unit is second.") \
M(SettingUInt64, disagg_task_snapshot_timeout, DEFAULT_DISAGG_TASK_TIMEOUT_SEC, "disagg task snapshot max endurable time, unit is second.") \
M(SettingUInt64, disagg_fetch_pages_timeout, DEFAULT_DISAGG_FETCH_PAGES_TIMEOUT_SEC, "fetch disagg pages timeout for one segment, unit is second.") \
M(SettingString, disagg_blocklist_wn_store_id, "", "comma seperated unsigned integers representing `store_id`s of stores that are blocklisted.") \
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this parameter designed to identify issues online and configure them manually?

Copy link
Contributor

@Lloyd-Pottiger Lloyd-Pottiger left a comment

Choose a reason for hiding this comment

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

lgtm

@ti-chi-bot ti-chi-bot bot added the needs-1-more-lgtm Indicates a PR needs 1 more LGTM. label Nov 4, 2024
{}
{
#if SERVERLESS_PROXY == 1
std::istringstream iss(context.getSettingsRef().disagg_blocklist_wn_store_id);
Copy link
Contributor

Choose a reason for hiding this comment

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

Why not parse this parameter when the server startup?

Copy link
Member Author

Choose a reason for hiding this comment

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

fixed

std::istringstream iss(context.getSettingsRef().disagg_blocklist_wn_store_id);
std::string token;

while (std::getline(iss, token, ','))
Copy link
Contributor

Choose a reason for hiding this comment

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

Using functions like boost::split can simplify these code.

Copy link
Member Author

Choose a reason for hiding this comment

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

Seems the function is not applicable to unordereed_set

const FilterConditions & filter_conditions;

std::unique_ptr<DAGExpressionAnalyzer> analyzer;
std::unordered_set<uint64_t> store_id_blocklist;
Copy link
Contributor

Choose a reason for hiding this comment

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

I think store_id_blocklist is very small, and std::vector is more cache friendly and efficently.

Copy link
Member Author

Choose a reason for hiding this comment

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

It will eventually be converted to unordered_set as an argument to a API in client-c. A better way(if necessay) is make store_id_blocklist into a sigleton.

Signed-off-by: Calvin Neo <calvinneo1995@gmail.com>
Signed-off-by: Calvin Neo <calvinneo1995@gmail.com>
@ti-chi-bot ti-chi-bot bot added the approved label Nov 4, 2024
Signed-off-by: Calvin Neo <calvinneo1995@gmail.com>
Signed-off-by: Calvin Neo <calvinneo1995@gmail.com>
Signed-off-by: Calvin Neo <calvinneo1995@gmail.com>
Signed-off-by: Calvin Neo <calvinneo1995@gmail.com>
Signed-off-by: Calvin Neo <calvinneo1995@gmail.com>
CalvinNeo and others added 5 commits November 6, 2024 13:31
Co-authored-by: JaySon <tshent@qq.com>
Co-authored-by: JaySon <tshent@qq.com>
Signed-off-by: Calvin Neo <calvinneo1995@gmail.com>
Signed-off-by: Calvin Neo <calvinneo1995@gmail.com>
Copy link
Contributor

@JaySon-Huang JaySon-Huang left a comment

Choose a reason for hiding this comment

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

LGTM

@ti-chi-bot
Copy link
Contributor

ti-chi-bot bot commented Nov 6, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: JaySon-Huang, Lloyd-Pottiger

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:
  • OWNERS [JaySon-Huang,Lloyd-Pottiger]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@ti-chi-bot ti-chi-bot bot added lgtm and removed needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Nov 6, 2024
@ti-chi-bot
Copy link
Contributor

ti-chi-bot bot commented Nov 6, 2024

[LGTM Timeline notifier]

Timeline:

  • 2024-11-04 03:37:15.453906349 +0000 UTC m=+839348.293061888: ☑️ agreed by Lloyd-Pottiger.
  • 2024-11-06 06:37:03.185697677 +0000 UTC m=+1022936.024853217: ☑️ agreed by JaySon-Huang.

@CalvinNeo
Copy link
Member Author


tidb-ci/force_enable_lm/timestamp_literal.test: Running

  File: tidb-ci/force_enable_lm/timestamp_literal.test

  Error line: 22

  Error: set @@tidb_isolation_read_engines='tiflash'; set time_zone = '+9:00'; select * from test.t where value = (select max(value) from test.t);

  Result:

    ERROR 1105 (HY000) at line 1: interface conversion: interface is nil, not base.Plan

  Expected:

    +------+---------------------+

    | id   | value               |

    +------+---------------------+

    |    1 | 2020-01-01 09:00:00 |

    +------+---------------------+

@CalvinNeo
Copy link
Member Author

/pull-integration-test

1 similar comment
@CalvinNeo
Copy link
Member Author

/pull-integration-test

@JaySon-Huang
Copy link
Contributor

/test pull-integration-test

@ti-chi-bot ti-chi-bot bot merged commit bc0fc13 into pingcap:master Nov 7, 2024
JaySon-Huang pushed a commit to ti-chi-bot/tiflash that referenced this pull request Nov 18, 2024
close pingcap#9575

Signed-off-by: Calvin Neo <calvinneo1995@gmail.com>

Co-authored-by: ti-chi-bot[bot] <108142056+ti-chi-bot[bot]@users.noreply.github.com>
@JaySon-Huang
Copy link
Contributor

cherry pick to release-8.5 along with this PR: #9651

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved lgtm release-note-none Denotes a PR that doesn't merit a release note. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Introduce blocklist mechanism on serverless TiFlash WN node

4 participants