[VOTE] PIP-279: Reformat property in generateResponseWithEntry

2023-06-27 Thread steven lu
Hi, community:

# Motivation

reformat property,for a http header name cannot contain the following
prohibited characters: =,;: \t\r\n\v\f

for example:
{"city=shanghai":"tag"}
when we run `bin/pulsar-admin topics get-message-by-id `, it will
throw exception, the exception is:
`Reason: java.util.concurrent.CompletionException:
org.apache.pulsar.client.admin.internal.http.AsyncHttpConnector$RetryException:
Could not complete the operation. Number of retries has been
exhausted. Failed reason: a header name cannot contain the following
prohibited characters: =,;: \t\r\n\v\f: =`

# High Level Design

In master branch,
in an http 
request:getMessageById("/{tenant}/{namespace}/{topic}/ledger/{ledgerId}/entry/{entryId}"),
replace `"X-Pulsar-PROPERTY-" + msgProperties.getKey()` with
`"X-Pulsar-PROPERTY"`

After release-3.1.0, this feature begins to take effect.


PIP: https://github.com/apache/pulsar/pull/20627

PR: https://github.com/apache/pulsar/pull/20481


[DISCUSS] PIP-279: Reformat property in generateResponseWithEntry

2023-06-20 Thread steven lu
# Motivation

reformat property,for a http header name cannot contain the following
prohibited characters: =,;: \t\r\n\v\f

for example:
{"city=shanghai":"tag"}
when we run `bin/pulsar-admin topics get-message-by-id `, it will
throw exception, the exception is:
`Reason: java.util.concurrent.CompletionException:
org.apache.pulsar.client.admin.internal.http.AsyncHttpConnector$RetryException:
Could not complete the operation. Number of retries has been
exhausted. Failed reason: a header name cannot contain the following
prohibited characters: =,;: \t\r\n\v\f: =`

https://github.com/StevenLuMT/pulsar/assets/42990025/973d95b9-4ac2-4977-b160-162c4b53a613;>

# High Level Design

In master branch,
in an http 
request:getMessageById("/{tenant}/{namespace}/{topic}/ledger/{ledgerId}/entry/{entryId}"),
replace `"X-Pulsar-PROPERTY-" + msgProperties.getKey()` with
`"X-Pulsar-PROPERTY"`

After release-3.1.0, this feature begins to take effect.


[DISCUSS] PIP-244: Refactor ByteBuf release method

2023-01-29 Thread steven lu
[DISCUSS] PIP-244: Refactor ByteBuf release method
Hello everyone. I hope you guys are all doing well. I would like to start
the discussion for PIP-244 https://github.com/apache/pulsar/issues/19350,
Please let me know if you have any concerns or questions.
--- Paste original PIP content to help quote --

### Motivation

It may throw an exception when release a `ByteBuf` object. so the exception
in `ByteBuf.release` should be checked.

### Goal

Use `ReferenceCountUtil.safeRelease()` instead of `ByteBuf.release()` in
all Pulsar's classes.

### API Changes

_No response_

### Implementation

1. Use `ReferenceCountUtil.safeRelease()` instead of `ByteBuf.release()`.