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

TDBStore: Unlock the master mutex even after garbage_collect() #11971

Merged
merged 1 commit into from
Nov 29, 2019

Conversation

SeppoTakalo
Copy link
Contributor

Description

Summary of change

TDBStore::set() was leaving a mutex locked in case it failed to write a data, and then started a garbage collection phase.

Fixed the sequence so that mutex is always unlocked, regardless of whether we run the GC or not.

Fixes #11723


Pull request type

[X] Patch update (Bug fix / Target update / Docs update / Test update / Refactor)
[] Feature update (New feature / Functionality change / New API)
[] Major update (Breaking change E.g. Return code change / API behaviour change)

Test results

[] No Tests required for this change (E.g docs only update)
[X] Covered by existing mbed-os tests (Greentea or Unittest)
[] Tests / results supplied as part of this PR

Reviewers

@VeijoPesonen

Copy link
Contributor

@VeijoPesonen VeijoPesonen left a comment

Choose a reason for hiding this comment

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

Looks good to me

@mbed-ci
Copy link

mbed-ci commented Nov 28, 2019

Test run: SUCCESS

Summary: 11 of 11 test jobs passed
Build number : 1
Build artifacts

@0xc0170
Copy link
Contributor

0xc0170 commented Nov 28, 2019

Restarted travis, has not reported back

@0xc0170 0xc0170 merged commit 733f5e2 into master Nov 29, 2019
@SeppoTakalo SeppoTakalo deleted the IOTSTOR-951 branch December 4, 2019 11:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

TDBStore fails to unlock mutex on set() failure
4 participants