[ 
https://issues.apache.org/jira/browse/IGNITE-28311?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Andrey Mashenkov reassigned IGNITE-28311:
-----------------------------------------

    Assignee: Andrey Mashenkov

> Massive Integer boxing in index lockers
> ---------------------------------------
>
>                 Key: IGNITE-28311
>                 URL: https://issues.apache.org/jira/browse/IGNITE-28311
>             Project: Ignite
>          Issue Type: Bug
>          Components: sql ai3
>            Reporter: Denis Chudov
>            Assignee: Andrey Mashenkov
>            Priority: Major
>              Labels: ignite-3
>
> See [1]
> It creates Map<Integer, IndexLocker> using index id as a key. There is 
> limited amount of index ids in the system, but every time plain int value is 
> boxed causing huge heap allocations (up to 491 MiB per sample in JFR that I 
> examined).
> Stack trace:
> {noformat}
> void java.lang.Thread.run()
> void java.lang.Thread.runWith(Object, Runnable)
> void java.util.concurrent.ThreadPoolExecutor$Worker.run()
> void 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor$Worker)
> void 
> org.apache.ignite.internal.replicator.ReplicaService$$Lambda.0x0000000800f9c228.run()
> void 
> org.apache.ignite.internal.replicator.ReplicaService.lambda$sendToReplicaRaw$6(CompletableFuture,
>  ErrorReplicaResponse)
> boolean 
> java.util.concurrent.CompletableFuture.completeExceptionally(Throwable)
> void java.util.concurrent.CompletableFuture.postComplete()
> CompletableFuture 
> java.util.concurrent.CompletableFuture$UniHandle.tryFire(int)
> boolean java.util.concurrent.CompletableFuture.uniHandle(Object, BiFunction, 
> CompletableFuture$UniHandle)
> Object 
> org.apache.ignite.internal.table.distributed.storage.InternalTableImpl$$Lambda.0x0000000801167068.apply(Object,
>  Object)
> CompletableFuture 
> org.apache.ignite.internal.table.distributed.storage.InternalTableImpl.lambda$trackingInvoke$13(int,
>  InternalTransaction, int, ReplicaRequest, PendingTxPartitionEnlistment, 
> BiPredicate, Object, Throwable)
> CompletableFuture 
> org.apache.ignite.internal.table.distributed.storage.InternalTableImpl.trackingInvoke(InternalTransaction,
>  int, Function, boolean, PendingTxPartitionEnlistment, BiPredicate, int)
> CompletableFuture 
> org.apache.ignite.internal.replicator.ReplicaService.invoke(String, 
> ReplicaRequest)
> CompletableFuture 
> org.apache.ignite.internal.replicator.ReplicaService.sendToReplica(String, 
> ReplicaRequest)
> CompletableFuture 
> org.apache.ignite.internal.replicator.ReplicaService.sendToReplicaRaw(String, 
> ReplicaRequest)
> CompletableFuture 
> org.apache.ignite.internal.network.MessagingService.invoke(String, 
> NetworkMessage, long)
> CompletableFuture 
> org.apache.ignite.internal.network.wrapper.JumpToExecutorByConsistentIdAfterSend.invoke(String,
>  ChannelType, NetworkMessage, long)
> CompletableFuture 
> org.apache.ignite.internal.network.DefaultMessagingService.invoke(String, 
> ChannelType, NetworkMessage, long)
> CompletableFuture 
> org.apache.ignite.internal.network.DefaultMessagingService.invoke0(InternalClusterNode,
>  ChannelType, NetworkMessage, long, boolean)
> void 
> org.apache.ignite.internal.network.DefaultMessagingService.sendToSelf(NetworkMessage,
>  Long)
> void 
> org.apache.ignite.internal.replicator.ReplicaManager$$Lambda.0x0000000800486c98.onReceived(NetworkMessage,
>  InternalClusterNode, Long)
> void 
> org.apache.ignite.internal.replicator.ReplicaManager.onReplicaMessageReceived(NetworkMessage,
>  InternalClusterNode, Long)
> void 
> org.apache.ignite.internal.replicator.ReplicaManager.handleReplicaRequest(ReplicaRequest,
>  InternalClusterNode, Long)
> CompletableFuture 
> org.apache.ignite.internal.replicator.ZonePartitionReplicaImpl.processRequest(ReplicaRequest,
>  UUID)
> CompletableFuture 
> org.apache.ignite.internal.partition.replicator.ZonePartitionReplicaListener.invoke(ReplicaRequest,
>  UUID)
> CompletableFuture java.util.concurrent.CompletableFuture.thenCompose(Function)
> CompletableFuture 
> java.util.concurrent.CompletableFuture.uniComposeStage(Executor, Function)
> Object 
> org.apache.ignite.internal.partition.replicator.ZonePartitionReplicaListener$$Lambda.0x0000000801058000.apply(Object)
> CompletionStage 
> org.apache.ignite.internal.partition.replicator.ZonePartitionReplicaListener.lambda$invoke$0(ReplicaRequest,
>  UUID, ReplicaPrimacy)
> CompletableFuture 
> org.apache.ignite.internal.partition.replicator.ZonePartitionReplicaListener.processRequest(ReplicaRequest,
>  ReplicaPrimacy, UUID)
> CompletableFuture 
> org.apache.ignite.internal.partition.replicator.ZonePartitionReplicaListener.processTableAwareRequest(ReplicaRequest,
>  ReplicaPrimacy, UUID)
> CompletableFuture java.util.concurrent.CompletableFuture.thenCompose(Function)
> CompletableFuture 
> java.util.concurrent.CompletableFuture.uniComposeStage(Executor, Function)
> Object 
> org.apache.ignite.internal.partition.replicator.ZonePartitionReplicaListener$$Lambda.0x0000000801072810.apply(Object)
> CompletionStage 
> org.apache.ignite.internal.partition.replicator.ZonePartitionReplicaListener.lambda$processTableAwareRequest$4(ReplicaRequest,
>  ReplicaPrimacy, UUID, Void)
> CompletableFuture 
> org.apache.ignite.internal.table.distributed.replicator.PartitionReplicaListener.process(ReplicaRequest,
>  ReplicaPrimacy, UUID)
> CompletableFuture 
> org.apache.ignite.internal.table.distributed.replicator.PartitionReplicaListener.processRequestInContext(ReplicaRequest,
>  ReplicaPrimacy, UUID)
> CompletableFuture 
> org.apache.ignite.internal.table.distributed.replicator.PartitionReplicaListener.processRequest(ReplicaRequest,
>  ReplicaPrimacy)
> CompletableFuture 
> org.apache.ignite.internal.table.distributed.replicator.PartitionReplicaListener.processOperationRequestWithTxOperationManagementLogic(ReplicaRequest,
>  ReplicaPrimacy, HybridTimestamp)
> CompletableFuture 
> org.apache.ignite.internal.table.distributed.replicator.PartitionReplicaListener.processOperationRequest(ReplicaRequest,
>  ReplicaPrimacy, HybridTimestamp)
> CompletableFuture 
> org.apache.ignite.internal.table.distributed.replicator.PartitionReplicaListener.appendTxCommand(UUID,
>  ZonePartitionId, RequestType, boolean, Supplier)
> Object 
> org.apache.ignite.internal.table.distributed.replicator.PartitionReplicaListener$$Lambda.0x000000080114b800.get()
> CompletableFuture 
> org.apache.ignite.internal.table.distributed.replicator.PartitionReplicaListener.lambda$processOperationRequest$10(ReadWriteSingleRowPkReplicaRequest,
>  ReplicaPrimacy)
> CompletableFuture 
> org.apache.ignite.internal.table.distributed.replicator.PartitionReplicaListener.processSingleEntryAction(ReadWriteSingleRowPkReplicaRequest,
>  long)
> CompletableFuture 
> org.apache.ignite.internal.table.distributed.replicator.PartitionReplicaListener.resolveRowByPk(BinaryTuple,
>  UUID, IgniteTriFunction)
> Object 
> org.apache.ignite.internal.table.TableImpl$$Lambda.0x00000008010250a8.get()
> Map org.apache.ignite.internal.table.TableImpl.lambda$indexesLockers$1(int)
> Integer java.lang.Integer.valueOf(int)
> {noformat}
> Probably int map should be used, or field type should be changed from plain 
> int to Integer.
> [1]TableImpl#indexesLockers



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to