-
Notifications
You must be signed in to change notification settings - Fork 6
lock_object_storage_task_distribution_ms setting #866
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
base: antalya-25.3
Are you sure you want to change the base?
Conversation
fd2dde7
to
f1a4e00
Compare
f1a4e00
to
258bbbb
Compare
""", | ||
query_id=query_id_first, | ||
timeout=30, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Timeouts removed, because it creates to many descriptors.
(https://github.com/Altinity/ClickHouse/blob/antalya/tests/integration/helpers/client.py#L209)
Locally tests failed with "too many open files".
object_info = file_iterator->next(processor); | ||
|
||
if (!object_info || object_info->getPath().empty()) | ||
return {}; | ||
|
||
StorageObjectStorageStableTaskDistributor::CommandInTaskResponse command(object_info->getPath()); | ||
if (command.is_parsed()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not elegant, but for backward compatibility left string as filename and JSON as something with additional information.
Can be extended in future.
: iterator(std::move(iterator_)) | ||
, connection_to_files(ids_of_nodes_.size()) | ||
, ids_of_nodes(ids_of_nodes_) | ||
, lock_object_storage_task_distribution_us(lock_object_storage_task_distribution_ms_ * 1000) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Poco::Timestamp is in microseconds, so here convert from milliseconds to microseconds to avoid multiplications or divides later.
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes to CHANGELOG.md):
Setting
lock_object_storage_task_distribution_ms
to improve cache locality with swarm clusterDocumentation entry for user-facing changes
Solve #867
Setting
lock_object_storage_task_distribution_ms
prevent object to be processed on non-primary swarm nodes when primary is alive at lastlock_object_storage_task_distribution_ms
milliseconds.Swarm has 2 nodes, node1 processed all objects, node2 is overloaded and processed only part objects.
Behavior before PR and default (with
lock_object_storage_task_distribution_ms=0
): node1 takes unprocessed objects.Behavior with
lock_object_storage_task_distribution_ms=3000
- node1 takes unprocessed objects only if node2 does not take it for 3 seconds. If node2 took something 1 second ago, node1 waits and makes new request after 2 seconds. If node2 still did not take any object, objects goes to node1. It node2 took something, node1 waits again till the end of new 3-second period.Exclude tests: