[
https://issues.apache.org/jira/browse/HDDS-7382?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
ChenXi updated HDDS-7382:
-------------------------
Description:
We encountered an exception in the use of Ozone, which was finally located
because the modification time of the file was modified when Ozone was
processing the file rename.
For Linux, only the parent directory modification time is changed when renaming.
But Ozone fs directly changes modification time of renamed files instead of its
parent directory
Linux:
{code:bash}
// Some comments here
[root@mac /root/test-rename]% ls -ld ..
drwxr-x---+ 178 root staff 5696 Oct 24 15:45 ..
[root@mac /Users/root/test-rename]% ls -l file1
rw-rr- 1 root staff 0 Oct 24 15:25 file1
[root@mac /Users/root/test-rename]% mv file1 file2
# The file modification time has not changed, its parent directory modification
time has changed
[root@mac /Users/root/test-rename]% ls -l file2
rw-rr- 1 root staff 0 Oct 24 15:25 file2
[root@mac /Users/root/test-rename]% ls -ld ..
drwxr-x---+ 178 root staff 5696 Oct 24 15:45 ..
[root@mac /Users/root/test-rename]%R
{code}
Ozone fs directly changes modificationTime of renamed files instead of its
parent directory
!screenshot-1.png!
!image-2022-10-24-15-56-22-471.png!
was:
Linux:
{code:bash}
// Some comments here
[root@mac /root/test-rename]% ls -ld ..
drwxr-x---+ 178 root staff 5696 Oct 24 15:45 ..
[root@mac /Users/root/test-rename]% ls -l file1
rw-rr- 1 root staff 0 Oct 24 15:25 file1
[root@mac /Users/root/test-rename]% mv file1 file2
# The file modification time has not changed, its parent directory modification
time has changed
[root@mac /Users/root/test-rename]% ls -l file2
rw-rr- 1 root staff 0 Oct 24 15:25 file2
[root@mac /Users/root/test-rename]% ls -ld ..
drwxr-x---+ 178 root staff 5696 Oct 24 15:45 ..
[root@mac /Users/root/test-rename]%R
{code}
Ozone fs directly changes modificationTime of renamed files instead of its
parent directory
!screenshot-1.png!
!image-2022-10-24-15-56-22-471.png!
> Ozone fs changes modificationTime of renamed files
> --------------------------------------------------
>
> Key: HDDS-7382
> URL: https://issues.apache.org/jira/browse/HDDS-7382
> Project: Apache Ozone
> Issue Type: Bug
> Components: Ozone Filesystem
> Reporter: ChenXi
> Priority: Major
> Attachments: image-2022-10-24-15-56-22-471.png, screenshot-1.png
>
>
> We encountered an exception in the use of Ozone, which was finally located
> because the modification time of the file was modified when Ozone was
> processing the file rename.
> For Linux, only the parent directory modification time is changed when
> renaming.
> But Ozone fs directly changes modification time of renamed files instead of
> its parent directory
> Linux:
> {code:bash}
> // Some comments here
> [root@mac /root/test-rename]% ls -ld ..
> drwxr-x---+ 178 root staff 5696 Oct 24 15:45 ..
> [root@mac /Users/root/test-rename]% ls -l file1
> rw-rr- 1 root staff 0 Oct 24 15:25 file1
> [root@mac /Users/root/test-rename]% mv file1 file2
> # The file modification time has not changed, its parent directory
> modification time has changed
> [root@mac /Users/root/test-rename]% ls -l file2
> rw-rr- 1 root staff 0 Oct 24 15:25 file2
> [root@mac /Users/root/test-rename]% ls -ld ..
> drwxr-x---+ 178 root staff 5696 Oct 24 15:45 ..
> [root@mac /Users/root/test-rename]%R
> {code}
> Ozone fs directly changes modificationTime of renamed files instead of its
> parent directory
> !screenshot-1.png!
> !image-2022-10-24-15-56-22-471.png!
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]