-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
[WIP] Maintain TaskLockbox at datasource level for higher concurrency #17390
base: master
Are you sure you want to change the base?
Conversation
This pull request has been marked as stale due to 60 days of inactivity. |
This pull request has been marked as stale due to 60 days of inactivity. |
Description
In clusters with a large number of datasources, task operations block each other owing to the
giant
lock in theTaskLockbox
. This can become particularly problematic in cases of streaming ingestion being done into multiple datasources, where segment allocations become very slow since all of them must pass through a single queue.None of the task operations share a critical section across datasources and it should suffice to perform the locking at the datasource level.
This patch is an attempt to remediate this problem.
Changes
TaskLockbox
to a single datasource. We can rename this toDataSourceTaskLockbox
or something more appropriate later. For now, the name has been left unchanged to simplify the diff and review process.GlobalTaskLockbox
which delegates to the respective datasource for any operation.GlobalTaskLockbox.sync()
must still be mutually exclusive from any operation being performed on any of the datasources. This is performed by using aReentrantReadWriteLock
.Pending
SegmentAllocationQueue
at datasource level.TaskLockbox
for a datasource when it is not needed anymoreThis PR has: