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

backport some bug fix to release1.2 #474

Merged
merged 3 commits into from
Jul 28, 2021

Conversation

wu-hanqing
Copy link
Contributor

@wu-hanqing wu-hanqing commented Jul 27, 2021

What is changed and how it works?

What's Changed: backport #368 #358 #464 to release1.2

How it Works:

Side effects(Breaking backward compatibility? Performance regression?):

Check List

  • Relevant documentation/comments is changed or added
  • I acknowledge that all my contributions will be made under the project's license

wu-hanqing and others added 3 commits July 27, 2021 19:44
After opencurve#172 and opencurve#209, source volume data of the clone volume
can be read within the client through SourceReader, and each
source volume was also opened and represented by a FileInstance,
but `FileInstance::mdsclient_` points to `FileClient::mdsClient_`,
so after FileClient is destroyed, `FileInstance::mdsclient_`
becomes dangling pointer.

To fix this problem, we let `FileClient::mdsClient_` be a shared_ptr,
and each FileInstance holds ownership of it.

Signed-off-by: Hanqing Wu <wuhanqing@corp.netease.com>
When uninit FileClient and some files are not closed, in
FileInstance's destructor it will destroy LeaseExecutor, but
LeaseExecutor's destructor will wait for backend lease task to stop,
so without explicit close a file, thread will be stuck here.

Signed-off-by: wuhanqing <wuhanqing@hotmail.com>
@wu-hanqing wu-hanqing changed the title client: backport some bug fix to release1.2 backport some bug fix to release1.2 Jul 28, 2021
@ilixiaocui ilixiaocui merged commit f5a400f into opencurve:release1.2 Jul 28, 2021
@wu-hanqing wu-hanqing deleted the backport/release1.2 branch August 6, 2021 16:11
ilixiaocui pushed a commit to ilixiaocui/curve that referenced this pull request Feb 6, 2023
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