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

Fix directory deletion failure in DiskSpaceAllocator #1244

Merged
merged 1 commit into from
Aug 20, 2019

Conversation

jsjtzyy
Copy link
Contributor

@jsjtzyy jsjtzyy commented Aug 20, 2019

There was bug in previous refactoring of DiskSpaceAllocator. When
cleaning up old files and directories, code misused file deletion rather
than directory deletion. This PR ensures Utils.deleteFileOrDirectory is
called in this case and extends unit test to mock non-empty directory
deletion.

There was bug in previous refactoring of DiskSpaceAllocator. When
cleaning up old files and directories, code misused file deletion rather
than directory deletion. This PR ensures Utils.deleteFileOrDirectory is
called in this case and extends unit test to mock non-empty directory
deletion.
@jsjtzyy jsjtzyy requested a review from zzmao August 20, 2019 01:01
@jsjtzyy jsjtzyy added the bug label Aug 20, 2019
@jsjtzyy jsjtzyy self-assigned this Aug 20, 2019
@codecov-io
Copy link

Codecov Report

Merging #1244 into master will decrease coverage by 0.08%.
The diff coverage is 100%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master    #1244      +/-   ##
============================================
- Coverage      72.3%   72.21%   -0.09%     
+ Complexity     6047     6039       -8     
============================================
  Files           439      439              
  Lines         34910    34909       -1     
  Branches       4430     4429       -1     
============================================
- Hits          25241    25210      -31     
- Misses         8522     8549      +27     
- Partials       1147     1150       +3
Impacted Files Coverage Δ Complexity Δ
...ava/com.github.ambry.store/DiskSpaceAllocator.java 90.63% <100%> (+0.71%) 74 <0> (ø) ⬇️
.../com.github.ambry.network/BlockingChannelInfo.java 82.25% <0%> (-6.46%) 16% <0%> (-1%)
...a/com.github.ambry.network/SSLBlockingChannel.java 77.04% <0%> (-4.92%) 4% <0%> (ø)
...java/com.github.ambry.network/SSLTransmission.java 70.22% <0%> (-2.92%) 69% <0%> (-2%)
.../java/com.github.ambry.router/DeleteOperation.java 93.28% <0%> (-1.5%) 44% <0%> (-1%)
...m.github.ambry.replication/ReplicationMetrics.java 94.92% <0%> (-1.21%) 43% <0%> (-1%)
...c/main/java/com.github.ambry.network/Selector.java 79.48% <0%> (-0.86%) 73% <0%> (-1%)
...va/com.github.ambry.replication/ReplicaThread.java 87.33% <0%> (-0.76%) 91% <0%> (-1%)
...rc/main/java/com.github.ambry.store/BlobStore.java 89.58% <0%> (-0.25%) 92% <0%> (-1%)
...ain/java/com.github.ambry.router/PutOperation.java 91.55% <0%> (-0.17%) 113% <0%> (-1%)
... and 2 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update dd5edba...87b6602. Read the comment docs.

@zzmao zzmao merged commit c27df56 into linkedin:master Aug 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants