Skip to content

Fix using locks in ProcessList#51348

Merged
vitlibar merged 3 commits intoClickHouse:masterfrom
vitlibar:fix-using-locks-in-process-list
Jun 27, 2023
Merged

Fix using locks in ProcessList#51348
vitlibar merged 3 commits intoClickHouse:masterfrom
vitlibar:fix-using-locks-in-process-list

Conversation

@vitlibar
Copy link
Copy Markdown
Member

Changelog category:

  • Not for changelog

Fixes #51150

@robot-clickhouse robot-clickhouse added the pr-not-for-changelog This PR should not be mentioned in the changelog label Jun 23, 2023
@robot-clickhouse
Copy link
Copy Markdown
Member

robot-clickhouse commented Jun 23, 2023

This is an automated comment for commit 1ae51ff with description of existing statuses. It's updated for the latest CI running
The full report is available here
The overall status of the commit is 🟡 pending

Check nameDescriptionStatus
CI runningA meta-check that indicates the running CI. Normally, it's in success or pending state. The failed status indicates some problems with the PR🟡 pending
Mergeable CheckChecks if all other necessary checks are successful🟢 success

Copy link
Copy Markdown
Member

@davenger davenger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks like here https://github.com/ClickHouse/ClickHouse/pull/51348/files#diff-c6034fc738bf184e41e5218132c88c572ee70ff8cad9964cd6a42643009ecf99R596-R600 context needs to be grabbed like this

    ContextPtr ctx = context.lock();
    if (get_settings && ctx)
    {
        res.query_settings = std::make_shared<Settings>(ctx->getSettings());
        res.current_database = ctx->getCurrentDatabase();
    }

@davenger davenger self-assigned this Jun 26, 2023
@vitlibar
Copy link
Copy Markdown
Member Author

looks like here https://github.com/ClickHouse/ClickHouse/pull/51348/files#diff-c6034fc738bf184e41e5218132c88c572ee70ff8cad9964cd6a42643009ecf99R596-R600 context needs to be grabbed like this

    ContextPtr ctx = context.lock();
    if (get_settings && ctx)
    {
        res.query_settings = std::make_shared<Settings>(ctx->getSettings());
        res.current_database = ctx->getCurrentDatabase();
    }

done

@vitlibar vitlibar merged commit 0f842f9 into ClickHouse:master Jun 27, 2023
@vitlibar vitlibar deleted the fix-using-locks-in-process-list branch June 27, 2023 10:21
baibaichen added a commit to Kyligence/gluten that referenced this pull request Jun 28, 2023
baibaichen added a commit to Kyligence/gluten that referenced this pull request Jun 28, 2023
baibaichen added a commit to Kyligence/gluten that referenced this pull request Jun 28, 2023
baibaichen added a commit to Kyligence/gluten that referenced this pull request Jun 28, 2023
baibaichen added a commit to apache/gluten that referenced this pull request Jun 28, 2023
* [GLUTEN-1632][CH]Daily Update Clickhouse Version (20230628)

* line 1999: fix build due to ClickHouse/ClickHouse#51455
line 2591: fix build due to ClickHouse/ClickHouse#51348

* fix build due to ClickHouse/ClickHouse#51455

---------

Co-authored-by: kyligence-git <[email protected]>
Co-authored-by: Chang Chen <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-not-for-changelog This PR should not be mentioned in the changelog

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Lock order inversion in OvercommitTracker, ProcessList, DiskAccessStorage, QueryStatus and Context

3 participants