You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@phoenix.apache.org by Francesco Malerba <ma...@gmail.com> on 2019/12/17 18:18:24 UTC
Multiple rows with same key
Hi all,
we are having some troubles with Phoenix 4.14 on top of Hbase 1.2, because
some select are returning duplicate rows with the same private.
In our application, we make several upsert of rows with the same key since
we have to keep synchronized an oracle and a phoenix table.
We started to notice this problem after the update of phoenix to version
4.14 from version 4.7 and hbase from version 1.1 to version 1.2.
I suspect this issue could be somehow related to returning different
versions of the same hbase row as different rows.
In order to look into this issue, my idea was to perform some scan directly
on hbase, but i noticed that some bytes are appended after the first field
of the PK and i'm not able to produce the equivalent scan of my select.
Finally my question are:
Is there a way to use the phoenix library to produce the equivalent bytes
of my query to use in the Hbase Shell?
Could this issues be related to the update of phoenix, since the data were
written using phoenix 4.7 and now we are reading them from a phoenix 4.14
server ?
Any hint will be appreciated.
Thanks
[image: image.png]
Re: Multiple rows with same key
Posted by Sukumar Maddineni <sm...@salesforce.com.INVALID>.
As Lars requested, can you please provide your schema(mask confidential
info) and also sample rows where you see duplicate rows and how you are
upserting them.
Agree with William that if the table is salted and you alter salt buckets
then you will see weird behaviour. Recently we had a similar issue where we
truncated salted table using hbase shell "truncate" command(changed region
boundaries) and inserted data back and that impacted salt buckets and
showed duplicate entries.
--
Sukumar
On Wed, Dec 18, 2019 at 11:37 AM William Shen <wi...@marinsoftware.com>
wrote:
> Also, quick question, is your table salted, and have you done anything that
> might have altered the salt buckets?
>
> On Wed, Dec 18, 2019 at 7:50 AM larsh@apache.org <la...@apache.org> wrote:
>
> > You mean you see multiple rows with the same primary key? I have not see
> > this - or heard about this before.
> >
> > Could you post your schema?
> > -- Lars
> >
> > On Tuesday, December 17, 2019, 7:42:13 PM GMT+1, Francesco Malerba <
> > malerba.francesco.89@gmail.com> wrote:
> >
> > Hi all,
> > we are having some troubles with Phoenix 4.14 on top of Hbase 1.2,
> because
> > some select are returning duplicate rows with the same private.
> > In our application, we make several upsert of rows with the same key
> since
> > we have to keep synchronized an oracle and a phoenix table.
> >
> > We started to notice this problem after the update of phoenix to version
> > 4.14 from version 4.7 and hbase from version 1.1 to version 1.2.
> >
> > I suspect this issue could be somehow related to returning different
> > versions of the same hbase row as different rows.
> > In order to look into this issue, my idea was to perform some scan
> > directly on hbase, but i noticed that some bytes are appended after the
> > first field of the PK and i'm not able to produce the equivalent scan of
> my
> > select.
> >
> > Finally my question are:
> > Is there a way to use the phoenix library to produce the equivalent bytes
> > of my query to use in the Hbase Shell?
> >
> > Could this issues be related to the update of phoenix, since the data
> were
> > written using phoenix 4.7 and now we are reading them from a phoenix 4.14
> > server ?
> >
> > Any hint will be appreciated.
> > Thanks
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
>
--
<http://smart.salesforce.com/sig/smaddineni//us_mb/default/link.html>
Re: Multiple rows with same key
Posted by William Shen <wi...@marinsoftware.com>.
Also, quick question, is your table salted, and have you done anything that
might have altered the salt buckets?
On Wed, Dec 18, 2019 at 7:50 AM larsh@apache.org <la...@apache.org> wrote:
> You mean you see multiple rows with the same primary key? I have not see
> this - or heard about this before.
>
> Could you post your schema?
> -- Lars
>
> On Tuesday, December 17, 2019, 7:42:13 PM GMT+1, Francesco Malerba <
> malerba.francesco.89@gmail.com> wrote:
>
> Hi all,
> we are having some troubles with Phoenix 4.14 on top of Hbase 1.2, because
> some select are returning duplicate rows with the same private.
> In our application, we make several upsert of rows with the same key since
> we have to keep synchronized an oracle and a phoenix table.
>
> We started to notice this problem after the update of phoenix to version
> 4.14 from version 4.7 and hbase from version 1.1 to version 1.2.
>
> I suspect this issue could be somehow related to returning different
> versions of the same hbase row as different rows.
> In order to look into this issue, my idea was to perform some scan
> directly on hbase, but i noticed that some bytes are appended after the
> first field of the PK and i'm not able to produce the equivalent scan of my
> select.
>
> Finally my question are:
> Is there a way to use the phoenix library to produce the equivalent bytes
> of my query to use in the Hbase Shell?
>
> Could this issues be related to the update of phoenix, since the data were
> written using phoenix 4.7 and now we are reading them from a phoenix 4.14
> server ?
>
> Any hint will be appreciated.
> Thanks
>
>
>
>
>
>
>
>
>
>
>
Re: Multiple rows with same key
Posted by "larsh@apache.org" <la...@apache.org>.
You mean you see multiple rows with the same primary key? I have not see this - or heard about this before.
Could you post your schema?
-- Lars
On Tuesday, December 17, 2019, 7:42:13 PM GMT+1, Francesco Malerba <ma...@gmail.com> wrote:
Hi all,
we are having some troubles with Phoenix 4.14 on top of Hbase 1.2, because some select are returning duplicate rows with the same private.
In our application, we make several upsert of rows with the same key since we have to keep synchronized an oracle and a phoenix table.
We started to notice this problem after the update of phoenix to version 4.14 from version 4.7 and hbase from version 1.1 to version 1.2.
I suspect this issue could be somehow related to returning different versions of the same hbase row as different rows.
In order to look into this issue, my idea was to perform some scan directly on hbase, but i noticed that some bytes are appended after the first field of the PK and i'm not able to produce the equivalent scan of my select.
Finally my question are:
Is there a way to use the phoenix library to produce the equivalent bytes of my query to use in the Hbase Shell?
Could this issues be related to the update of phoenix, since the data were written using phoenix 4.7 and now we are reading them from a phoenix 4.14 server ?
Any hint will be appreciated.
Thanks