You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ignite.apache.org by "Ignite TC Bot (Jira)" <ji...@apache.org> on 2022/10/25 09:06:00 UTC
[jira] [Commented] (IGNITE-17964) Potential deadlock in discovery thread while updating SQL statistics.
[ https://issues.apache.org/jira/browse/IGNITE-17964?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17623689#comment-17623689 ]
Ignite TC Bot commented on IGNITE-17964:
----------------------------------------
{panel:title=Branch: [pull/10344/head] Base: [master] : No blockers found!|borderStyle=dashed|borderColor=#ccc|titleBGColor=#D6F7C1}{panel}
{panel:title=Branch: [pull/10344/head] Base: [master] : New Tests (4)|borderStyle=dashed|borderColor=#ccc|titleBGColor=#D6F7C1}
{color:#00008b}Queries 3 (lazy=true){color} [[tests 2|https://ci.ignite.apache.org/viewLog.html?buildId=6862340]]
* {color:#013220}IgniteBinaryCacheQueryLazyTestSuite3: StatisticsConfigurationTest.testOrphanDataCleanup[persist=false] - PASSED{color}
* {color:#013220}IgniteBinaryCacheQueryLazyTestSuite3: StatisticsConfigurationTest.testOrphanDataCleanup[persist=true] - PASSED{color}
{color:#00008b}Queries 3{color} [[tests 2|https://ci.ignite.apache.org/viewLog.html?buildId=6862346]]
* {color:#013220}IgniteBinaryCacheQueryTestSuite3: StatisticsConfigurationTest.testOrphanDataCleanup[persist=true] - PASSED{color}
* {color:#013220}IgniteBinaryCacheQueryTestSuite3: StatisticsConfigurationTest.testOrphanDataCleanup[persist=false] - PASSED{color}
{panel}
[TeamCity *--> Run :: All* Results|https://ci.ignite.apache.org/viewLog.html?buildId=6861774&buildTypeId=IgniteTests24Java8_RunAll]
> Potential deadlock in discovery thread while updating SQL statistics.
> ---------------------------------------------------------------------
>
> Key: IGNITE-17964
> URL: https://issues.apache.org/jira/browse/IGNITE-17964
> Project: Ignite
> Issue Type: Bug
> Components: sql
> Reporter: Andrey Mashenkov
> Assignee: Andrey Mashenkov
> Priority: Major
> Fix For: 2.15
>
> Time Spent: 10m
> Remaining Estimate: 0h
>
> On node start/activation IgniteStatisticsConfigurationManager initializes and tries to cleanup orphaned records (e.g. for tables, which were dropped before node stop/crash).
> To do that *stat-mgmt* thread updates distributed metastorage synchronously under the read-lock.
> Underneath, metastorage sends a request via discovery, then
> discovery component gets the answer on that message, and gets stuck trying to get the write-lock to complete the future...
> So, *stat-mgmt* and *disco-notify* threads fall into inevitable deadlock.
> We should avoid any synchronous operation on distributed metastorage under the read-lock.
> Let’s rewrite synchronous CAS deep inside the closure (see IgniteStatisticsConfigurationManager.updateLocalStatistics) to async CAS and pull it's future up to outside the closure and the read-lock.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)