[ 
https://issues.apache.org/jira/browse/HDDS-11008?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17856052#comment-17856052
 ] 

Ethan Rose commented on HDDS-11008:
-----------------------------------

This has always been the case. It has to do with the encoding of the values. 
RocksDB keys are binary, we are just using {{long}} as a holder of the bytes. 
The object ID values are computed from the Ratis transaction ID using [binary 
operations|https://github.com/apache/ozone/blob/cb5d51983d044734a714f32a32255dc9604eb701/hadoop-ozone/common/src/main/java/org/apache/hadoop/ozone/OmUtils.java#L590].
 This is going to make the base 10 representation of the number being displayed 
here invalid, probably because of two's compliment implementation details I 
don't recall off the top of my head.

Since only the uniqueness of the binary values are important, core Ozone should 
be fine with this. We could change the implementation of our LDB wrapper to 
print the bytes in a different way, but that may be confusing if it does not 
give the same value that the code is actually working with since Java is also 
deserializing this as a long.

> OM's directoryTable shows, with ldb, negative long values as objectID and 
> parentObjectID
> ----------------------------------------------------------------------------------------
>
>                 Key: HDDS-11008
>                 URL: https://issues.apache.org/jira/browse/HDDS-11008
>             Project: Apache Ozone
>          Issue Type: Bug
>          Components: OM
>    Affects Versions: 1.4.0
>            Reporter: Siddhant Sangwan
>            Priority: Major
>
> {code}
> # ozone debug ldb --db=om.db scan --cf=directoryTable
> 24/06/13 05:14:45 INFO helpers.OmKeyInfo: OmKeyInfo.getCodec ignorePipeline = 
> true
> 24/06/13 05:14:45 INFO helpers.OmKeyInfo: OmKeyInfo.getCodec ignorePipeline = 
> true
> 24/06/13 05:14:45 INFO helpers.OmKeyInfo: OmKeyInfo.getCodec ignorePipeline = 
> true
> 24/06/13 05:14:45 INFO helpers.OmKeyInfo: OmKeyInfo.getCodec ignorePipeline = 
> true
> 24/06/13 05:14:45 INFO helpers.OmKeyInfo: OmKeyInfo.getCodec ignorePipeline = 
> true
> { 
> "/-9223371984968727296/-9223371984968698880/-9223371984968698880/0c2lg4xioj": 
> {
>   "name": "0c2lg4xioj",
>   "creationTime": 1718108840313,
>   "modificationTime": 1718108840313,
>   "acls": [
>     {
>       "type": "USER",
>       "name": "om@A.B.C",
>       "aclBitSet": [
>         0,
>         0,
>         0,
>         0,
>         0,
>         0,
>         0,
>         1
>       ],
>       "aclScope": "ACCESS"
>     },
>     {
>       "type": "GROUP",
>       "name": "om",
>       "aclBitSet": [
>         0,
>         0,
>         0,
>         0,
>         0,
>         0,
>         0,
>         1
>       ],
>       "aclScope": "ACCESS"
>     }
>   ],
>   "parentObjectID": -9223371984968698880,
>   "objectID": -9223371984968667903,
>   "updateID": 202680109,
>   "metadata": {}
> }, 
> "/-9223371985070811904/-9223371985070784768/-9223371985070784768/0c2lg4xioj": 
> {
>   "name": "0c2lg4xioj",
>   "creationTime": 1718108677371,
>   "modificationTime": 1718108677371,
>   "acls": [
>     {
>       "type": "USER",
>       "name": "om@A.B.C",
>       "aclBitSet": [
>         0,
>         0,
>         0,
>         0,
>         0,
>         0,
>         0,
>         1
>       ],
>       "aclScope": "ACCESS"
>     },
>     {
>       "type": "GROUP",
>       "name": "om",
>       "aclBitSet": [
>         0,
>         0,
>         0,
>         0,
>         0,
>         0,
>         0,
>         1
>       ],
>       "aclScope": "ACCESS"
>     }
>   ],
>   "parentObjectID": -9223371985070784768,
>   "objectID": -9223371985070755327,
>   "updateID": 202281330,
>   "metadata": {}
> },
> ...
> ...
> {code}
> The negative Long values look like an overflow bug. There are 31 directories 
> and 102 million keys in this cluster. Keys created using freon ockg. They are 
> FSO keys.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@ozone.apache.org
For additional commands, e-mail: issues-h...@ozone.apache.org

Reply via email to