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

meta: remove tail zero slice in compactChunk #4789

Merged
merged 1 commit into from
Apr 26, 2024
Merged

meta: remove tail zero slice in compactChunk #4789

merged 1 commit into from
Apr 26, 2024

Conversation

SandyXSD
Copy link
Contributor

@SandyXSD SandyXSD commented Apr 26, 2024

$ dd if=/dev/zero of=/jfs/tmp bs=1M count=10
$ truncate -s 4 /jfs/tmp
$ juicefs compact /jfs/tmp

# before
$ juicefs info /jfs/tmp
 objects:
+------------+----------------------------------+---------+--------+---------+
| chunkIndex |            objectName            |   size  | offset |  length |
+------------+----------------------------------+---------+--------+---------+
|          0 | test/chunks/0/24/24578_0_4194304 | 4194304 |      0 | 4194304 |
|          0 | test/chunks/0/24/24578_1_4194304 | 4194304 |      0 | 4194304 |
|          0 | test/chunks/0/24/24578_2_2097152 | 2097152 |      0 | 2097152 |
+------------+----------------------------------+---------+--------+---------+

# with this fix
$ juicefs info /jfs/tmp
 objects:
+------------+----------------------------+------+--------+--------+
| chunkIndex |         objectName         | size | offset | length |
+------------+----------------------------+------+--------+--------+
|          0 | test/chunks/0/28/28674_0_4 |    4 |      0 |      4 |
+------------+----------------------------+------+--------+--------+

@SandyXSD SandyXSD requested a review from davies April 26, 2024 04:06
@davies davies merged commit cb9ff1d into main Apr 26, 2024
32 checks passed
@davies davies deleted the fix-compact branch April 26, 2024 05:58
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