You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pulsar.apache.org by steven lu <lu...@gmail.com> on 2023/06/21 03:22:52 UTC

[DISCUSS] PIP-279: Reformat property in generateResponseWithEntry

# 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: =`

<img width="1288" alt="image"
src="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.

Re: [DISCUSS] PIP-279: Reformat property in generateResponseWithEntry

Posted by Shiji Lu <lu...@apache.org>.
the DISCUSS is passed,I have send the VOTE for this PIP
https://lists.apache.org/thread/g354684m9h495o3p0kmzb7fh7vfxhddx


On 2023/06/21 03:22:52 steven lu wrote:
> # 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: =`
> 
> <img width="1288" alt="image"
> src="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.
> 

Re: [DISCUSS] PIP-279: Reformat property in generateResponseWithEntry

Posted by houxiaoyu <ho...@apache.org>.
+1 non-binding

Xiaoyu Hou

Enrico Olivelli <eo...@gmail.com> 于2023年6月26日周一 14:57写道:

> +1 (binding)
>
> Enrico
>
> Il giorno lun 26 giu 2023 alle ore 07:53 guo jiwei
> <te...@apache.org> ha scritto:
> >
> > +1 (binding)
> >
> > This is a bug and we need this fix.
> >
> >
> >
> >
> > Regards
> > Jiwei Guo (Tboy)
> >
> >
> > On Wed, Jun 21, 2023 at 11:23 AM steven lu <lu...@gmail.com>
> wrote:
> >
> > > # 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: =`
> > >
> > > <img width="1288" alt="image"
> > > src="
> > >
> 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.
> > >
>

Re: [DISCUSS] PIP-279: Reformat property in generateResponseWithEntry

Posted by Enrico Olivelli <eo...@gmail.com>.
+1 (binding)

Enrico

Il giorno lun 26 giu 2023 alle ore 07:53 guo jiwei
<te...@apache.org> ha scritto:
>
> +1 (binding)
>
> This is a bug and we need this fix.
>
>
>
>
> Regards
> Jiwei Guo (Tboy)
>
>
> On Wed, Jun 21, 2023 at 11:23 AM steven lu <lu...@gmail.com> wrote:
>
> > # 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: =`
> >
> > <img width="1288" alt="image"
> > src="
> > 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.
> >

Re: [DISCUSS] PIP-279: Reformat property in generateResponseWithEntry

Posted by guo jiwei <te...@apache.org>.
+1 (binding)

This is a bug and we need this fix.




Regards
Jiwei Guo (Tboy)


On Wed, Jun 21, 2023 at 11:23 AM steven lu <lu...@gmail.com> wrote:

> # 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: =`
>
> <img width="1288" alt="image"
> src="
> 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.
>