You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by "kostacie (via GitHub)" <gi...@apache.org> on 2025/07/21 10:10:16 UTC
[PR] HDDS-12094. OzoneKey isFile returns true for directories [ozone]
kostacie opened a new pull request, #8838:
URL: https://github.com/apache/ozone/pull/8838
## What changes were proposed in this pull request?
This PR is based on another [PR](https://github.com/apache/ozone/pull/7740) that includes changes:
- the isFile payload to the BasicKeyInfo proto message
- the protobuf (de)serialization in BasicOmKeyInfo to get/set the isFile status
- a new integration test
- a robot test to check if the isFile set correctly.
## What is the link to the Apache JIRA
[HDDS-12094](https://issues.apache.org/jira/browse/HDDS-12094)
## How was this patch tested?
https://github.com/kostacie/ozone/actions/runs/16411739652
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
Re: [PR] HDDS-12094. OzoneKey isFile returns true for directories [ozone]
Posted by "adoroszlai (via GitHub)" <gi...@apache.org>.
adoroszlai commented on PR #8838:
URL: https://github.com/apache/ozone/pull/8838#issuecomment-3151293112
Thanks @kostacie for updating the patch, LGTM.
Let's wait for others to take another look.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
Re: [PR] HDDS-12094. OzoneKey isFile returns true for directories [ozone]
Posted by "adoroszlai (via GitHub)" <gi...@apache.org>.
adoroszlai commented on code in PR #8838:
URL: https://github.com/apache/ozone/pull/8838#discussion_r2218877922
##########
hadoop-ozone/dist/src/main/smoketest/compatibility/read.robot:
##########
@@ -155,3 +155,22 @@ HSync Lease Recover Can Be Used
Pass Execution If '${CLIENT_VERSION}' < '${HSYNC_VERSION}' Client does not support HSYNC
Pass Execution If '${CLUSTER_VERSION}' < '${HSYNC_VERSION}' Cluster does not support HSYNC
Execute ozone admin om lease recover --path=ofs://om/vol1/fso-bucket-${DATA_VERSION}/dir/subdir/file
+
+Key Info File Flag Should Be Set Correctly
+ Pass Execution If '${CLUSTER_VERSION}' <= '${EC_VERSION}' Cluster does not support 'file' flag
+ Pass Execution If '${CLIENT_VERSION}' <= '${EC_VERSION}' Client does not support 'file' flag
+
+ ${volume} = Create Random Volume
+ ${bucket} = Create bucket with layout ${volume} FILE_SYSTEM_OPTIMIZED
+
+ ${keypath} = Set Variable /${volume}/${bucket}/dir-${DATA_VERSION}/file-${DATA_VERSION}
+ ${dirpath} = Set Variable /${volume}/${bucket}/dir-${DATA_VERSION}/
+
+ Execute ozone fs -mkdir -p ${dirpath}
+ Create Key ${keypath} ${TESTFILE}
Review Comment:
These are write operations, should be in `write.robot`. Better yet, please use existing dir and key created here:
https://github.com/apache/ozone/blob/b5dbc08d06e4a9ebeedc827762e329e3593cc9d1/hadoop-ozone/dist/src/main/smoketest/compatibility/write.robot#L53-L57
https://github.com/apache/ozone/blob/b5dbc08d06e4a9ebeedc827762e329e3593cc9d1/hadoop-ozone/dist/src/main/smoketest/compatibility/write.robot#L41-L42
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
Re: [PR] HDDS-12094. OzoneKey isFile returns true for directories [ozone]
Posted by "adoroszlai (via GitHub)" <gi...@apache.org>.
adoroszlai commented on code in PR #8838:
URL: https://github.com/apache/ozone/pull/8838#discussion_r2247385443
##########
hadoop-ozone/dist/src/main/smoketest/compatibility/read.robot:
##########
@@ -155,3 +155,16 @@ HSync Lease Recover Can Be Used
Pass Execution If '${CLIENT_VERSION}' < '${HSYNC_VERSION}' Client does not support HSYNC
Pass Execution If '${CLUSTER_VERSION}' < '${HSYNC_VERSION}' Cluster does not support HSYNC
Execute ozone admin om lease recover --path=ofs://om/vol1/fso-bucket-${DATA_VERSION}/dir/subdir/file
+
+Key Info File Flag Should Be Set Correctly
+ Pass Execution If '${CLUSTER_VERSION}' <= '${EC_VERSION}' Cluster does not support 'file' flag
+ Pass Execution If '${CLIENT_VERSION}' <= '${EC_VERSION}' Client does not support 'file' flag
Review Comment:
> Can it be related to the type of created bucket in some test or is there other explanation for this?
You are right, it only works in FSO bucket for clients preceding the patch. Please use
- `/vol1/fso-bucket-${DATA_VERSION}/dir/subdir/` for `${dirpath}`
- `${dirpath}file` for `${filepath}`
These are created here:
https://github.com/apache/ozone/blob/2aa35672d62e7058903dd5b5cf0853749f19240f/hadoop-ozone/dist/src/main/smoketest/compatibility/write.robot#L72-L73
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
Re: [PR] HDDS-12094. OzoneKey isFile returns true for directories [ozone]
Posted by "kostacie (via GitHub)" <gi...@apache.org>.
kostacie commented on code in PR #8838:
URL: https://github.com/apache/ozone/pull/8838#discussion_r2225292490
##########
hadoop-ozone/dist/src/main/smoketest/compatibility/read.robot:
##########
@@ -155,3 +155,16 @@ HSync Lease Recover Can Be Used
Pass Execution If '${CLIENT_VERSION}' < '${HSYNC_VERSION}' Client does not support HSYNC
Pass Execution If '${CLUSTER_VERSION}' < '${HSYNC_VERSION}' Cluster does not support HSYNC
Execute ozone admin om lease recover --path=ofs://om/vol1/fso-bucket-${DATA_VERSION}/dir/subdir/file
+
+Key Info File Flag Should Be Set Correctly
+ Pass Execution If '${CLUSTER_VERSION}' <= '${EC_VERSION}' Cluster does not support 'file' flag
+ Pass Execution If '${CLIENT_VERSION}' <= '${EC_VERSION}' Client does not support 'file' flag
Review Comment:
@ptlrs thank you for the review. Does it mean that we should log a result of the `ozone sh key info`? Or what would you suggest to do?
I've just tested it and the results for older/newer clients or servers are different considering current changes, e.g.:
- `xcompat-cluster-1.1.0-client-1.1.0-read-2.1.0` doesn't contain the 'file' status;
- `xcompat-cluster-1.1.0-client-2.1.0-read-1.1.0` sets `'file' : false` for the file and `'false'` for the directory;
- `xcompat-cluster-2.1.0-client-1.1.0-read-1.1.0` doesn't contain the 'file' status;
- `xcompat-cluster-2.1.0-client-1.4.1-read-1.4.1` sets `'file' : true` for the directory;
- `xcompat-cluster-2.1.0-client-2.0.0-read-2.0.0` sets `'file' : true` for the directory;
I wonder why the results are incorrect for 1.4.1 and newer versions after removing manual creation of volume, bucket, key and directory from the test. Before that, it worked fine for >1.3 versions. Can it be related to the type of created bucket in some test or is there other explanation for this?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
Re: [PR] HDDS-12094. OzoneKey isFile returns true for directories [ozone]
Posted by "jojochuang (via GitHub)" <gi...@apache.org>.
jojochuang commented on code in PR #8838:
URL: https://github.com/apache/ozone/pull/8838#discussion_r2302483356
##########
hadoop-ozone/dist/src/main/smoketest/compatibility/read.robot:
##########
@@ -155,3 +155,16 @@ HSync Lease Recover Can Be Used
Pass Execution If '${CLIENT_VERSION}' < '${HSYNC_VERSION}' Client does not support HSYNC
Pass Execution If '${CLUSTER_VERSION}' < '${HSYNC_VERSION}' Cluster does not support HSYNC
Execute ozone admin om lease recover --path=ofs://om/vol1/fso-bucket-${DATA_VERSION}/dir/subdir/file
+
+Key Info File Flag Should Be Set Correctly
+ Pass Execution If '${CLUSTER_VERSION}' <= '${EC_VERSION}' Cluster does not support 'file' flag
+ Pass Execution If '${CLIENT_VERSION}' <= '${EC_VERSION}' Client does not support 'file' flag
+
+ ${dirpath} = Set Variable /vol1/fso-bucket-${DATA_VERSION}/dir/subdir/
+ ${filepath} = Set Variable ${dirpath}file
+
+ ${key_info} = Execute ozone sh key info ${filepath}
Review Comment:
this test does not look valid to me.
The gist of the issue is BasicOmKeyInfo misses a few fields, including isFile.
ozone sh key info is implemented by InfoKeyHandler, which doesn't use BasicOmKeyInfo.
Perhaps we should try ozone sh key list, which uses RpcClient.listKeys() API and uses BasicOmKeyInfo objects.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
Re: [PR] HDDS-12094. OzoneKey isFile returns true for directories [ozone]
Posted by "jojochuang (via GitHub)" <gi...@apache.org>.
jojochuang commented on PR #8838:
URL: https://github.com/apache/ozone/pull/8838#issuecomment-3226287357
Given that Attila already +1, I'd suggest to commit the fix, because it's real bug, but open another PR to fix the robot test.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
Re: [PR] HDDS-12094. OzoneKey isFile returns true for directories [ozone]
Posted by "ivandika3 (via GitHub)" <gi...@apache.org>.
ivandika3 commented on PR #8838:
URL: https://github.com/apache/ozone/pull/8838#issuecomment-3530599595
@jojochuang @adoroszlai Any further actions on this? Since it's been +1, we can resolve merge conflicts and merge if the CI pass?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
Re: [PR] HDDS-12094. OzoneKey isFile returns true for directories [ozone]
Posted by "ptlrs (via GitHub)" <gi...@apache.org>.
ptlrs commented on code in PR #8838:
URL: https://github.com/apache/ozone/pull/8838#discussion_r2223477118
##########
hadoop-ozone/dist/src/main/smoketest/compatibility/read.robot:
##########
@@ -155,3 +155,16 @@ HSync Lease Recover Can Be Used
Pass Execution If '${CLIENT_VERSION}' < '${HSYNC_VERSION}' Client does not support HSYNC
Pass Execution If '${CLUSTER_VERSION}' < '${HSYNC_VERSION}' Cluster does not support HSYNC
Execute ozone admin om lease recover --path=ofs://om/vol1/fso-bucket-${DATA_VERSION}/dir/subdir/file
+
+Key Info File Flag Should Be Set Correctly
+ Pass Execution If '${CLUSTER_VERSION}' <= '${EC_VERSION}' Cluster does not support 'file' flag
+ Pass Execution If '${CLIENT_VERSION}' <= '${EC_VERSION}' Client does not support 'file' flag
Review Comment:
We should not skip this check. We would like to see what happens when an older client talks to a newer version of the server and vice versa.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
Re: [PR] HDDS-12094. OzoneKey isFile returns true for directories [ozone]
Posted by "adoroszlai (via GitHub)" <gi...@apache.org>.
adoroszlai commented on PR #8838:
URL: https://github.com/apache/ozone/pull/8838#issuecomment-3541513747
Thanks @kostacie, @ptlrs for the patch, @jojochuang for the review.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
Re: [PR] HDDS-12094. OzoneKey isFile returns true for directories [ozone]
Posted by "errose28 (via GitHub)" <gi...@apache.org>.
errose28 commented on PR #8838:
URL: https://github.com/apache/ozone/pull/8838#issuecomment-3097340631
Thanks @kostacie for taking this up! @ptlrs can you help with the review as well?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
Re: [PR] HDDS-12094. OzoneKey isFile returns true for directories [ozone]
Posted by "adoroszlai (via GitHub)" <gi...@apache.org>.
adoroszlai commented on code in PR #8838:
URL: https://github.com/apache/ozone/pull/8838#discussion_r2223500186
##########
hadoop-ozone/dist/src/main/smoketest/compatibility/read.robot:
##########
@@ -155,3 +155,16 @@ HSync Lease Recover Can Be Used
Pass Execution If '${CLIENT_VERSION}' < '${HSYNC_VERSION}' Client does not support HSYNC
Pass Execution If '${CLUSTER_VERSION}' < '${HSYNC_VERSION}' Cluster does not support HSYNC
Execute ozone admin om lease recover --path=ofs://om/vol1/fso-bucket-${DATA_VERSION}/dir/subdir/file
+
+Key Info File Flag Should Be Set Correctly
+ Pass Execution If '${CLUSTER_VERSION}' <= '${EC_VERSION}' Cluster does not support 'file' flag
+ Pass Execution If '${CLIENT_VERSION}' <= '${EC_VERSION}' Client does not support 'file' flag
Review Comment:
Even with 1.4.1 (EC_VERSION is 1.4.0) this happens:
```
xcompat-cluster-2.1.0-client-1.4.1-read-1.4.1 :: Read Compatibility | FAIL |
15 tests, 14 passed, 1 failed
xcompat-cluster-1.4.1-client-1.4.1-read-2.1.0 :: Read Compatibility | FAIL |
15 tests, 14 passed, 1 failed
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
Re: [PR] HDDS-12094. OzoneKey isFile returns true for directories [ozone]
Posted by "kostacie (via GitHub)" <gi...@apache.org>.
kostacie commented on code in PR #8838:
URL: https://github.com/apache/ozone/pull/8838#discussion_r2225292490
##########
hadoop-ozone/dist/src/main/smoketest/compatibility/read.robot:
##########
@@ -155,3 +155,16 @@ HSync Lease Recover Can Be Used
Pass Execution If '${CLIENT_VERSION}' < '${HSYNC_VERSION}' Client does not support HSYNC
Pass Execution If '${CLUSTER_VERSION}' < '${HSYNC_VERSION}' Cluster does not support HSYNC
Execute ozone admin om lease recover --path=ofs://om/vol1/fso-bucket-${DATA_VERSION}/dir/subdir/file
+
+Key Info File Flag Should Be Set Correctly
+ Pass Execution If '${CLUSTER_VERSION}' <= '${EC_VERSION}' Cluster does not support 'file' flag
+ Pass Execution If '${CLIENT_VERSION}' <= '${EC_VERSION}' Client does not support 'file' flag
Review Comment:
@ptlrs thank you for the review. Does it mean that we should log a result of the `ozone sh key info`? Or what would you suggest to do?
I've just tested it and the results for older/newer clients or servers are different considering current changes, e.g.:
- `xcompat-cluster-1.1.0-client-1.1.0-read-2.1.0` doesn't contain the 'file' status;
- `xcompat-cluster-1.1.0-client-2.1.0-read-1.1.0` sets `'file' : false` for the file and `'false'` for the directory;
- `xcompat-cluster-2.1.0-client-1.1.0-read-1.1.0` doesn't contain the 'file' status;
- `xcompat-cluster-2.1.0-client-1.4.1-read-1.4.1` sets `'file' : true` for the directory;
- `xcompat-cluster-2.1.0-client-2.0.0-read-2.0.0` sets `'file' : true` for the directory;
I wonder why the results are incorrect for 1.4.1 and newer versions after removing manual creation of volume, bucket, key and directory from the test. Before that, it worked fine for ≥1.4.1 versions. Can it be related to the type of created bucket in some test or is there other explanation for this?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
Re: [PR] HDDS-12094. OzoneKey isFile returns true for directories [ozone]
Posted by "jojochuang (via GitHub)" <gi...@apache.org>.
jojochuang commented on code in PR #8838:
URL: https://github.com/apache/ozone/pull/8838#discussion_r2302467469
##########
hadoop-ozone/common/src/main/java/org/apache/hadoop/ozone/om/helpers/BasicOmKeyInfo.java:
##########
@@ -227,9 +228,14 @@ public static BasicOmKeyInfo getFromProtobuf(BasicKeyInfo basicKeyInfo,
basicKeyInfo.getFactor(),
basicKeyInfo.getEcReplicationConfig()))
.setETag(basicKeyInfo.getETag())
- .setIsFile(!keyName.endsWith("/"))
.setOwnerName(basicKeyInfo.getOwnerName());
+ if (basicKeyInfo.hasIsFile()) {
+ builder.setIsFile(basicKeyInfo.getIsFile());
+ } else {
+ builder.setIsFile(!keyName.endsWith("/"));
Review Comment:
The keyName of a dir in a FSO bucket is guaranteed to have a trailing slash because of KeyManagerImpl.getOmKeyInfoFSO().
Same for OBS and Legacy buckets in KeyManagerImpl.getOzoneFileStatus(). So this is good.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
Re: [PR] HDDS-12094. OzoneKey isFile returns true for directories [ozone]
Posted by "adoroszlai (via GitHub)" <gi...@apache.org>.
adoroszlai commented on code in PR #8838:
URL: https://github.com/apache/ozone/pull/8838#discussion_r2247385443
##########
hadoop-ozone/dist/src/main/smoketest/compatibility/read.robot:
##########
@@ -155,3 +155,16 @@ HSync Lease Recover Can Be Used
Pass Execution If '${CLIENT_VERSION}' < '${HSYNC_VERSION}' Client does not support HSYNC
Pass Execution If '${CLUSTER_VERSION}' < '${HSYNC_VERSION}' Cluster does not support HSYNC
Execute ozone admin om lease recover --path=ofs://om/vol1/fso-bucket-${DATA_VERSION}/dir/subdir/file
+
+Key Info File Flag Should Be Set Correctly
+ Pass Execution If '${CLUSTER_VERSION}' <= '${EC_VERSION}' Cluster does not support 'file' flag
+ Pass Execution If '${CLIENT_VERSION}' <= '${EC_VERSION}' Client does not support 'file' flag
Review Comment:
> Can it be related to the type of created bucket in some test or is there other explanation for this?
You are right, it only works in FSO bucket for clients preceding the patch. Please use
- `/vol1/fso-bucket-${DATA_VERSION}/dir/subdir` for `${dirpath}`
- `${dirpath}/file` for `${filepath}`
These are created here:
https://github.com/apache/ozone/blob/2aa35672d62e7058903dd5b5cf0853749f19240f/hadoop-ozone/dist/src/main/smoketest/compatibility/write.robot#L72-L73
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
Re: [PR] HDDS-12094. OzoneKey isFile returns true for directories [ozone]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #8838:
URL: https://github.com/apache/ozone/pull/8838#issuecomment-3514418272
This PR has been marked as stale due to 21 days of inactivity. Please comment or remove the stale label to keep it open. Otherwise, it will be automatically closed in 7 days.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
Re: [PR] HDDS-12094. OzoneKey isFile returns true for directories [ozone]
Posted by "jojochuang (via GitHub)" <gi...@apache.org>.
jojochuang commented on code in PR #8838:
URL: https://github.com/apache/ozone/pull/8838#discussion_r2302483356
##########
hadoop-ozone/dist/src/main/smoketest/compatibility/read.robot:
##########
@@ -155,3 +155,16 @@ HSync Lease Recover Can Be Used
Pass Execution If '${CLIENT_VERSION}' < '${HSYNC_VERSION}' Client does not support HSYNC
Pass Execution If '${CLUSTER_VERSION}' < '${HSYNC_VERSION}' Cluster does not support HSYNC
Execute ozone admin om lease recover --path=ofs://om/vol1/fso-bucket-${DATA_VERSION}/dir/subdir/file
+
+Key Info File Flag Should Be Set Correctly
+ Pass Execution If '${CLUSTER_VERSION}' <= '${EC_VERSION}' Cluster does not support 'file' flag
+ Pass Execution If '${CLIENT_VERSION}' <= '${EC_VERSION}' Client does not support 'file' flag
+
+ ${dirpath} = Set Variable /vol1/fso-bucket-${DATA_VERSION}/dir/subdir/
+ ${filepath} = Set Variable ${dirpath}file
+
+ ${key_info} = Execute ozone sh key info ${filepath}
Review Comment:
this test does not look valid to me.
ozone sh key info is implemented by InfoKeyHandler, which doesn't use BasicOmKeyInfo.
Perhaps we should try ozone sh key list, which uses RpcClient.listKeys() API and uses BasicOmKeyInfo objects.
##########
hadoop-ozone/common/src/main/java/org/apache/hadoop/ozone/om/helpers/BasicOmKeyInfo.java:
##########
@@ -227,9 +228,14 @@ public static BasicOmKeyInfo getFromProtobuf(BasicKeyInfo basicKeyInfo,
basicKeyInfo.getFactor(),
basicKeyInfo.getEcReplicationConfig()))
.setETag(basicKeyInfo.getETag())
- .setIsFile(!keyName.endsWith("/"))
.setOwnerName(basicKeyInfo.getOwnerName());
+ if (basicKeyInfo.hasIsFile()) {
+ builder.setIsFile(basicKeyInfo.getIsFile());
+ } else {
+ builder.setIsFile(!keyName.endsWith("/"));
Review Comment:
The keyName of a dir in a FSO bucket is guaranteed to have a trailing slash because of KeyManagerImpl.getOmKeyInfoFSO().
Same for OBS and Legacy buckets in KeyManagerImpl.getOzoneFileStatus()
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
Re: [PR] HDDS-12094. OzoneKey isFile returns true for directories [ozone]
Posted by "adoroszlai (via GitHub)" <gi...@apache.org>.
adoroszlai merged PR #8838:
URL: https://github.com/apache/ozone/pull/8838
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org