You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ignite.apache.org by "Roman Puchkovskiy (Jira)" <ji...@apache.org> on 2024/11/26 10:35:00 UTC
[jira] [Commented] (IGNITE-23716) Improve contented locks usage
[ https://issues.apache.org/jira/browse/IGNITE-23716?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17901161#comment-17901161 ]
Roman Puchkovskiy commented on IGNITE-23716:
--------------------------------------------
Items 3 and 5 are split out to IGNITE-23779
> Improve contented locks usage
> -----------------------------
>
> Key: IGNITE-23716
> URL: https://issues.apache.org/jira/browse/IGNITE-23716
> Project: Ignite
> Issue Type: Improvement
> Reporter: Alexey Scherbakov
> Priority: Major
> Labels: ignite-3
>
> IGNITE-23303 addressed some of condended lock usages, but not all.
> 1.
> {noformat}
> public Executor executorFor(short executorIndex, int stripeIndex) {
> assert executorIndex >= 0 : "Executor index is negative: " + executorIndex;
> if (!busyLock.enterBusy()) {
> return NO_OP_EXECUTOR;
> }
> try {
> return stripedExecutorFor(executorIndex).stripeExecutor(stripeIndex);
> } finally {
> busyLock.leaveBusy();
> }
> }{noformat}
> is called on every incoming message, and they might be millions.
> 2. ClockWaiter's busyLock can be removed, because it delegates to tracker which already has (already optimized) busy locks.
>
> 3. IgniteAttachmentLock writes to shared location both for sync and async paths - it should be striped in some way.
> 4. StripedRWLock used in PendingComparableValuesTracker and ReplicaManager doesn't check if write lock is already held
> 5. IgniteSpinBusyLock duplicates VersatileReadWriteLock in many aspects and vice versa. I believe ISBL can be replaces with VRWL.
> See for example org.apache.ignite.internal.util.IgniteUtils#inBusyLockAsync
> NOTE: don't forget to check results with UpsertKvBenchmark
>
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)