bharatviswa504 commented on pull request #1677:
URL: https://github.com/apache/ozone/pull/1677#issuecomment-744841055


   Currently, Unsigned field can't have negative default value in proto. If we 
set [default = -1], an error will be compiled.
   For now, we use getQuotaValue(long quota) to handle the default case in 
RpcClient..
   
   Might be use int64, but protobuf document said it is inefficient for 
negative numbers, not sure it is good idea. Just thought of bringing this up 
here?
   
   int64 | Uses variable-length encoding. Inefficient for encoding negative 
numbers – if your field is likely to have negative values, use sint64 instead. 
| int64 | long | int/long[3] | *int64
   -- | -- | -- | -- | -- | --
   
   I think it will also help if we plan to support quota on older buckets.
   
   The default will be -2, all older buckets will have -2, new buckets created 
after this feature will have -1. So, if one some sets quota on older buckets in 
this way, we can figure it out.
   
   


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
[email protected]



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

Reply via email to