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

Synchronize this method to match the synchronization on "setModFile". #5885

Closed
MinaQin opened this issue May 12, 2022 · 1 comment · Fixed by #6197
Closed

Synchronize this method to match the synchronization on "setModFile". #5885

MinaQin opened this issue May 12, 2022 · 1 comment · Fixed by #6197

Comments

@MinaQin
Copy link
Contributor

MinaQin commented May 12, 2022

Code Path:server/src/main/java/org/apache/iotdb/db/engine/storagegroup/TsFileResource.java
image

When one part of a getter/setter pair is synchronized the other part should be too. Failure to synchronize both sides of a pair may result in inconsistent behavior at runtime as callers access an inconsistent method state.

This rule raises an issue when either the method or the contents of one method in a getter/setter pair are synchrnoized but the other is not.

@dafei1288
Copy link
Contributor

[WeOpen Star]I would like to help

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants