jiangpengcheng commented on PR #21966:
URL: https://github.com/apache/pulsar/pull/21966#issuecomment-1911255173

   > > It's partly resolved, if the backend state store can specify whether a 
state value is a number(BK supports this), it won't return `stringValue` and 
`byteValue`
   > 
   > This happened with BK and 3.2.0 rc4. What does it mean that it's partly 
resolved?
   
   When using the BK state store, it won't return `stringValue` or `byteValue` 
if the value is a number, so it's fixed for BK.
   
   But if users use another state store, this state store may not be able to 
specify whether a state value is a number or a string(such as the 
`PulsarMetadataStateStoreImpl`),  then when the length of a state value's 
`byte[]` is equal to `Long.BYTES`, we can only return `numberValue` along with 
`stringValue` or `byteValue` because this state value can either be a number or 
string.
   
   This is also the reason why the type of `isNumber` is `Boolean`, because not 
all state store has the ability to know whether a state value is a number or 
not.
   


-- 
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: [email protected]

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

Reply via email to