You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pulsar.apache.org by Jiaqi Shen <gl...@gmail.com> on 2022/12/21 09:00:13 UTC

[DISCUSS] [GO-Client] The behavior of Seek is different with Java Client

Hi all.

I noticed that the behavior of go client Seek is different with Java
client, which may confuse the users.

More details here: https://github.com/apache/pulsar-client-go/issues/919.

Overall, if go client executes `Seek(id)`, it will reset its position in
`id` instead of `id+1` by default. It's different with Java Client.

I think we should modify it to make sure that Go Client `Seek()` has the
same behavior with Java Client. Even though it will bring the breaking
change.

Please feel free to leave your comments.

Thanks,
Jiaqi Shen

Re: [DISCUSS] [GO-Client] The behavior of Seek is different with Java Client

Posted by Michael Marshall <mm...@apache.org>.
+1

Thanks for your thorough description of the issue, Jiaqi Shen.

I support changing the go client to match the Java client's semantics.
Given that we haven't done the 1.0 release of the go client yet, I
think a breaking change is acceptable. The release notes should
clearly explain the changed behavior.

I think it would be valuable to add new documentation for a client
spec that is language agnostic and documents the expected client
behavior for each feature. That way the non-java client contributors
do not need to know Java in order to implement a client in another
language. It'd be similar to the protocol documentation.

Thanks,
Michael

On Fri, Dec 23, 2022 at 7:52 AM Haiting Jiang <ji...@gmail.com> wrote:
>
> +1 for fixing this.
> The client API semanic should stay consistent between different client
> languages.
>
> Thanks,
> Haiting
>
> On Wed, Dec 21, 2022 at 5:37 PM Zike Yang <zi...@apache.org> wrote:
> >
> > Hi Jiaqi,
> >
> > Thanks for raising up this discussion.
> > This is the wrong behavior for the go client, and it will make it
> > confusing for the go client user. +1 for fixing this wrong
> > implementation even though it will introduce breaking changes.
> >
> > Thanks,
> > Zike Yang
> >
> > On Wed, Dec 21, 2022 at 5:05 PM Yunze Xu <yz...@streamnative.io.invalid> wrote:
> > >
> > > +1 to me. It's a breaking change, but I think it's more like a wrong
> > > implementation in Go client.
> > >
> > > Thanks,
> > > Yunze
> > >
> > > On Wed, Dec 21, 2022 at 5:00 PM Jiaqi Shen <gl...@gmail.com> wrote:
> > > >
> > > > Hi all.
> > > >
> > > > I noticed that the behavior of go client Seek is different with Java
> > > > client, which may confuse the users.
> > > >
> > > > More details here: https://github.com/apache/pulsar-client-go/issues/919.
> > > >
> > > > Overall, if go client executes `Seek(id)`, it will reset its position in
> > > > `id` instead of `id+1` by default. It's different with Java Client.
> > > >
> > > > I think we should modify it to make sure that Go Client `Seek()` has the
> > > > same behavior with Java Client. Even though it will bring the breaking
> > > > change.
> > > >
> > > > Please feel free to leave your comments.
> > > >
> > > > Thanks,
> > > > Jiaqi Shen

Re: [DISCUSS] [GO-Client] The behavior of Seek is different with Java Client

Posted by Haiting Jiang <ji...@gmail.com>.
+1 for fixing this.
The client API semanic should stay consistent between different client
languages.

Thanks,
Haiting

On Wed, Dec 21, 2022 at 5:37 PM Zike Yang <zi...@apache.org> wrote:
>
> Hi Jiaqi,
>
> Thanks for raising up this discussion.
> This is the wrong behavior for the go client, and it will make it
> confusing for the go client user. +1 for fixing this wrong
> implementation even though it will introduce breaking changes.
>
> Thanks,
> Zike Yang
>
> On Wed, Dec 21, 2022 at 5:05 PM Yunze Xu <yz...@streamnative.io.invalid> wrote:
> >
> > +1 to me. It's a breaking change, but I think it's more like a wrong
> > implementation in Go client.
> >
> > Thanks,
> > Yunze
> >
> > On Wed, Dec 21, 2022 at 5:00 PM Jiaqi Shen <gl...@gmail.com> wrote:
> > >
> > > Hi all.
> > >
> > > I noticed that the behavior of go client Seek is different with Java
> > > client, which may confuse the users.
> > >
> > > More details here: https://github.com/apache/pulsar-client-go/issues/919.
> > >
> > > Overall, if go client executes `Seek(id)`, it will reset its position in
> > > `id` instead of `id+1` by default. It's different with Java Client.
> > >
> > > I think we should modify it to make sure that Go Client `Seek()` has the
> > > same behavior with Java Client. Even though it will bring the breaking
> > > change.
> > >
> > > Please feel free to leave your comments.
> > >
> > > Thanks,
> > > Jiaqi Shen

Re: [DISCUSS] [GO-Client] The behavior of Seek is different with Java Client

Posted by Zike Yang <zi...@apache.org>.
Hi Jiaqi,

Thanks for raising up this discussion.
This is the wrong behavior for the go client, and it will make it
confusing for the go client user. +1 for fixing this wrong
implementation even though it will introduce breaking changes.

Thanks,
Zike Yang

On Wed, Dec 21, 2022 at 5:05 PM Yunze Xu <yz...@streamnative.io.invalid> wrote:
>
> +1 to me. It's a breaking change, but I think it's more like a wrong
> implementation in Go client.
>
> Thanks,
> Yunze
>
> On Wed, Dec 21, 2022 at 5:00 PM Jiaqi Shen <gl...@gmail.com> wrote:
> >
> > Hi all.
> >
> > I noticed that the behavior of go client Seek is different with Java
> > client, which may confuse the users.
> >
> > More details here: https://github.com/apache/pulsar-client-go/issues/919.
> >
> > Overall, if go client executes `Seek(id)`, it will reset its position in
> > `id` instead of `id+1` by default. It's different with Java Client.
> >
> > I think we should modify it to make sure that Go Client `Seek()` has the
> > same behavior with Java Client. Even though it will bring the breaking
> > change.
> >
> > Please feel free to leave your comments.
> >
> > Thanks,
> > Jiaqi Shen

Re: [DISCUSS] [GO-Client] The behavior of Seek is different with Java Client

Posted by Yunze Xu <yz...@streamnative.io.INVALID>.
+1 to me. It's a breaking change, but I think it's more like a wrong
implementation in Go client.

Thanks,
Yunze

On Wed, Dec 21, 2022 at 5:00 PM Jiaqi Shen <gl...@gmail.com> wrote:
>
> Hi all.
>
> I noticed that the behavior of go client Seek is different with Java
> client, which may confuse the users.
>
> More details here: https://github.com/apache/pulsar-client-go/issues/919.
>
> Overall, if go client executes `Seek(id)`, it will reset its position in
> `id` instead of `id+1` by default. It's different with Java Client.
>
> I think we should modify it to make sure that Go Client `Seek()` has the
> same behavior with Java Client. Even though it will bring the breaking
> change.
>
> Please feel free to leave your comments.
>
> Thanks,
> Jiaqi Shen