Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FLASH-760: Fix region data not properly released caused by not pre-decoding snapshot regions #351

Closed
wants to merge 1 commit into from

Conversation

zanmato1984
Copy link
Contributor

  1. Fix region data caused not properly released caused by not pre-decoding snapshot regions;
  2. Add some log messages;
  3. Fix a mis-used mutex.

@zanmato1984 zanmato1984 requested a review from solotzg December 11, 2019 11:56
@zanmato1984 zanmato1984 changed the title FLASH-760: Fix region data caused not properly released caused by not pre-decoding snapshot regions FLASH-760: Fix region data not properly released caused by not pre-decoding snapshot regions Dec 11, 2019
@@ -47,9 +49,12 @@ RaftService::RaftService(DB::Context & db_context_)
data_reclaim_handle = background_pool.addTask([this] {
std::list<RegionDataReadInfoList> tmp;
{
std::lock_guard<std::mutex> lock(region_mutex);
std::lock_guard<std::mutex> lock(reclaim_mutex);
Copy link
Contributor

@solotzg solotzg Dec 11, 2019

Choose a reason for hiding this comment

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

I think it is better to keep this one and remove all other modification, otherwise too much log will be printed.

problem about pre-decode has been fixed: 78cbec9#diff-84ac5313afde15e37710c71494637ffbR158

@solotzg
Copy link
Contributor

solotzg commented Dec 12, 2019

I also fix the problem about mutex in #352 . What about closing this pr and merge that?

@zanmato1984 zanmato1984 deleted the fix-memory-leak branch December 12, 2019 06:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants