Uploaded image for project: 'Ignite'
  1. Ignite
  2. IGNITE-6923

Cache metrics are updated in timeout-worker potentially delaying critical code execution due to current implementation issues.

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Critical
    • Resolution: Fixed
    • 2.3
    • 2.4
    • None

    Description

      Some metrics are using cache iteration for calculation. If number of caches rather large this can be slow.

      Similar code is running in discovery thread.

      See stack trace for example.

      "grid-timeout-worker-#39%DPL_GRID%DplGridNodeName%" #152 prio=5 os_prio=0 tid=0x00007f1009a03000 nid=0x5caa runnable [0x00007f0f059d9000] 
         java.lang.Thread.State: RUNNABLE 
              at java.util.HashMap.containsKey(HashMap.java:595) 
              at java.util.HashSet.contains(HashSet.java:203) 
              at java.util.Collections$UnmodifiableCollection.contains(Collections.java:1032) 
              at org.apache.ignite.internal.processors.cache.IgniteCacheOffheapManagerImpl$3.apply(IgniteCacheOffheapManagerImpl.java:339)
              at org.apache.ignite.internal.processors.cache.IgniteCacheOffheapManagerImpl$3.apply(IgniteCacheOffheapManagerImpl.java:337)
              at org.apache.ignite.internal.util.lang.gridfunc.TransformFilteringIterator.hasNext:@TransformFilteringIterator.java:90)
              at org.apache.ignite.internal.util.lang.GridIteratorAdapter.hasNext(GridIteratorAdapter.java:45) 
              at org.apache.ignite.internal.processors.cache.IgniteCacheOffheapManagerImpl.cacheEntriesCount(IgniteCacheOffheapManagerImpl.java:293)
              at org.apache.ignite.internal.processors.cache.CacheMetricsImpl.getOffHeapPrimaryEntriesCount(CacheMetricsImpl.java:240)
              at org.apache.ignite.internal.processors.cache.CacheMetricsSnapshot.<init>(CacheMetricsSnapshot.java:271) 
              at org.apache.ignite.internal.processors.cache.GridCacheAdapter.localMetrics(GridCacheAdapter.java:3217) 
              at org.apache.ignite.internal.managers.discovery.GridDiscoveryManager$7.cacheMetrics(GridDiscoveryManager.java:1151)
              at org.apache.ignite.internal.managers.discovery.GridDiscoveryManager$7.nonHeapMemoryUsed(GridDiscoveryManager.java:1121)
              at org.apache.ignite.internal.managers.discovery.GridDiscoveryManager$7.metrics(GridDiscoveryManager.java:1087) 
              at org.apache.ignite.spi.discovery.tcp.internal.TcpDiscoveryNode.metrics(TcpDiscoveryNode.java:269) 
              at org.apache.ignite.internal.IgniteKernal$3.run(IgniteKernal.java:1175) 
              at org.apache.ignite.internal.processors.timeout.GridTimeoutProcessor$CancelableTask.onTimeout(GridTimeoutProcessor.java:256)
              - locked <0x00007f115f5bf890> (a org.apache.ignite.internal.processors.timeout.GridTimeoutProcessor$CancelableTask)
              at org.apache.ignite.internal.processors.timeout.GridTimeoutProcessor$TimeoutWorker.body(GridTimeoutProcessor.java:158)
              at org.apache.ignite.internal.util.worker.GridWorker.run(GridWorker.java:110) 
              at java.lang.Thread.run(Thread.java:748)
      

      Attachments

        Activity

          People

            alex_pl Aleksey Plekhanov
            ascherbakov Alexey Scherbakov
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: