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

Soumitra Sulav commented on HDDS-11441:
---------------------------------------

Output as expected on zero or negative values
{code:java}
expectedGeneration must be positive, but was 0
{code}


> ozone sh key put should only accept positive expectedGeneration
> ---------------------------------------------------------------
>
>                 Key: HDDS-11441
>                 URL: https://issues.apache.org/jira/browse/HDDS-11441
>             Project: Apache Ozone
>          Issue Type: Bug
>          Components: Ozone CLI
>    Affects Versions: 1.5.0
>            Reporter: Soumitra Sulav
>            Assignee: Attila Doroszlai
>            Priority: Minor
>              Labels: pull-request-available
>             Fix For: 1.5.0
>
>
> Atomic rewrite with expectedGeneration work on zero and negative values. This 
> breaks the behaviour of rewrite with generation
> {code:java}
> $ ozone sh key put vol1/buck1/ks.cfg anaconda-ks.cfg  --expectedGeneration=1
> NOT_SUPPORTED_OPERATION Feature disabled: ATOMIC_REWRITE_KEY
> $ ozone sh key put vol1/buck1/ks.cfg anaconda-ks.cfg  --expectedGeneration=-1
> ...
> $ ozone sh key info vol1/buck1/ks.cfg
> {
>   "volumeName" : "vol1",
>   "bucketName" : "buck1",
>   "name" : "ks.cfg",
>   ..
>   "metadata" : { },
>   "tags" : { },
>   ..
>   "generation" : 407,
>   "file" : true
> }
> {code}
> Also, a new metadata field has been added as part of this changeĀ 
> {{"generation : <n>"}}



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

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to