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

Show hint for overloaded shards #1923

Closed
galnat opened this issue Feb 11, 2025 · 13 comments
Closed

Show hint for overloaded shards #1923

galnat opened this issue Feb 11, 2025 · 13 comments
Assignees
Labels

Comments

@galnat
Copy link

galnat commented Feb 11, 2025

Show hints on page on for the following cases :

  • overloaded shard on a table that can't split - advice, need to put the correct table name in query.
  • overloaded shard of a secondary index table - advice, need to put the correct table name and index name in query.
  • overloaded shard and shard limit is reached - advice, need to put the correct table name in query and new limit?

Design - #1835
Backend - ydb-platform/ydb#13615

@galnat
Copy link
Author

galnat commented Feb 11, 2025

Overloaded shard and shard limit is reached.

Popup message:

Problem
The data shard is overloaded because the table was created with the AUTO_PARTITIONING_MAX_PARTITIONS_COUNT setting and has already reached its partition limit.

Recommendation
Increase the partition limit by executing query
ALTER TABLE <table_name> SET (AUTO_PARTITIONING_MAX_PARTITIONS_COUNT = <new_count>);

See documentation for more information.

@galnat
Copy link
Author

galnat commented Feb 11, 2025

Overloaded shard of a secondary index table.

Popup message:

Problem
The data shard is overloaded because the index is created without the AUTO_PARTITIONING_BY_LOAD clause.

Recommendation
Enable partitioning by load by executing query
ALTER TABLE <table_name> ALTER INDEX <index_name> SET (AUTO_PARTITIONING_BY_LOAD = ENABLED);

See documentation for more information.

@artemmufazalov
Copy link
Member

Create advisor API in open-source version and pass hints functionality internally

@adameat
Copy link
Member

adameat commented Feb 17, 2025

@artemmufazalov
to get hints you should make a normal health check call, but with return_hints=1 parameter:

/viewer/healthcheck?database=/dev02/home/xenoxeno/db1&return_hints=1

it will return all healthcheck data too.

@artemmufazalov
Copy link
Member

artemmufazalov commented Feb 17, 2025

HC with hints response example:

{
  "self_check_result": "GOOD",
  "issue_log": [
    {
      "id": "34a8-24c2a85b",
      "message": "Split by load is disabled on the table",
      "location": {
        "compute": {
          "tablet": {"id": ["72075186224106215"]},
          "schema": {"type": "table", "path": "/dev02/home/xenoxeno/db1/kv_test"}
        }
      },
      "type": "HINT-OVERLOADED-SHARD",
      "level": 3
    }
  ],
  "location": {"id": 50004, "host": "ydb-vla-dev02-001.search.yandex.net", "port": 31003}
}

Hint for this issue: #1875 (comment)

@artemmufazalov
Copy link
Member

ydb-platform/ydb#14416

@artemmufazalov
Copy link
Member

artemmufazalov commented Mar 4, 2025

Internal PR:
https://nda.ya.ru/t/dkXN0dVl7CTTS2

PR that adds ShardsTable to componentsRegistry:
#1993

PRs with refactoring and related fixes:
#1998
#2000
#2001
#2002
#2003
#2004

@adameat
Copy link
Member

adameat commented Mar 5, 2025

HC with hints response example:

{
"self_check_result": "GOOD",
"issue_log": [
{
"id": "34a8-24c2a85b",
"message": "Split by load is disabled on the table",
"location": {
"compute": {
"tablet": {"id": ["72075186224106215"]},
"schema": {"type": "table", "path": "/dev02/home/xenoxeno/db1/kv_test"}
}
},
"type": "HINT-OVERLOADED-SHARD",
"level": 3
}
],
"location": {"id": 50004, "host": "ydb-vla-dev02-001.search.yandex.net", "port": 31003}
}
Hint for this issue: #1875 (comment)

@artemmufazalov the first part of id field (34a8 in this example) is crc16 of the issue message. so it won't change without changing the message itself. and it's unique for every message (hint).

@artemmufazalov
Copy link
Member

Overloaded shards without partitioning advice was added here: https://nda.ya.ru/t/9N9rx5uT7Cenuv

@adameat
Copy link
Member

adameat commented Mar 17, 2025

@adameat

@artemmufazalov
Copy link
Member

artemmufazalov commented Mar 17, 2025

Overloaded shard when shards limit is reached advice was added here: https://nda.ya.ru/t/W7LHZxk27CpXTS

@artemmufazalov
Copy link
Member

Now UI has all hints, that are currently returned by backend.

There is no hint for overloaded shard of index table neither in UI, nor in backend, I created a separate issue for this: #2020

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants