coderzc opened a new pull request, #16199:
URL: https://github.com/apache/pulsar/pull/16199

   Fixes #16193 
   
   ### Motivation
   
   Now, if put a byte[] type state to a function, they can get an incorrect 
string type state using admin API.
   
   The root cause is that bytes may not be a well-formed UTF-8 byte sequence, 
so we should not decode it to a UTF-8 string.
   
   References: 
   [Unicode6.2.0](http://www.unicode.org/versions/Unicode6.2.0/ch03.pdf)
   
   ### Modifications
   
   Add a check the bytes whether is a well-formed UTF-8 byte sequence when 
decode the `FunctionState` bytes.
   
   ### Verifying this change
   
   - [x] Make sure that the change passes the CI checks.
   
   This change is already covered by existing tests, such as 
`testSourceByteState`, `testBytes2StringNotUTF8`
   
   ### Does this pull request potentially affect one of the following parts:
   
   *If `yes` was chosen, please highlight the changes*
   
     - Dependencies (does it add or upgrade a dependency): (yes / no)
     - The public API: (yes / no)
     - The schema: (yes / no / don't know)
     - The default values of configurations: (yes / no)
     - The wire protocol: (yes / no)
     - The rest endpoints: (yes / no)
     - The admin cli options: (yes / no)
     - Anything that affects deployment: (yes / no / don't know)
   
   ### Documentation
   
   Check the box below or label this PR directly.
   
   Need to update docs? 
   
   - [x] `doc-not-needed` 
   (Please explain why)


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