You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@phoenix.apache.org by "Lars Hofhansl (Jira)" <ji...@apache.org> on 2020/08/20 07:23:00 UTC
[jira] [Comment Edited] (PHOENIX-6090) Local indexes get out of
sync in 5.1.0
[ https://issues.apache.org/jira/browse/PHOENIX-6090?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17180995#comment-17180995 ]
Lars Hofhansl edited comment on PHOENIX-6090 at 8/20/20, 7:22 AM:
------------------------------------------------------------------
To reproduce:
{code:java}
-- In sqlline:
> create table test(pk1 integer not null, pk2 integer not null, v1 float, v2 float, v3 float constraint pk primary key (pk1, pk2));
> create local index l2 on test(v2);
> upsert into test values(rand()*1000, rand()*100000, rand(), rand(), rand());
> upsert into test select rand()*1000, rand()*100000, rand(), rand(), rand() from test;
...
-- In between every now and then in the HBase shell:
> split 'TEST'
-- then continue with (each time doubling the insert size)
> upsert into test select rand()*1000, rand()*100000, rand(), rand(), rand() from test;
-- Eventually
> select /*+ NO_INDEX */ count(*) from test;
-- and
> select count(*) from test;
-- will return different results
-- The index and the main table are out of sync.{code}
I'll try to write a hammer test for this.
[~kozdemir], since you mentioned noticing potential problems in the old write path.
was (Author: lhofhansl):
To reproduce:
{code:java}
-- In sqlline:
> create table test(pk1 integer not null, pk2 integer not null, v1 float, v2 float, v3 float constraint pk primary key (pk1, pk2));
> create local index l2 on test(v2);
> upsert into test values(rand()*1000, rand()*100000, rand(), rand(), rand());
> upsert into test select rand()*1000, rand()*100000, rand(), rand(), rand() from test;
...
-- In between every now and then in the HBase shell:
> split 'TEST'
-- then continue with (each time doubling the insert size)
> upsert into test select rand()*1000, rand()*100000, rand(), rand(), rand() from test;
-- Eventually
> select /*+ NO_INDEX */ count(*) from test;
-- and
select count(*) from test;
-- will return different results
-- The index and the main table are out of sync.{code}
I'll try to write a hammer test for this.
[~kozdemir], since you mentioned noticing potential problems in the old write path.
> Local indexes get out of sync in 5.1.0
> --------------------------------------
>
> Key: PHOENIX-6090
> URL: https://issues.apache.org/jira/browse/PHOENIX-6090
> Project: Phoenix
> Issue Type: Bug
> Affects Versions: 5.1.0
> Reporter: Lars Hofhansl
> Priority: Critical
> Fix For: 5.1.0
>
>
> {code:java}
> > select /*+ NO_INDEX */ count(*) from test;
> +----------+
> | COUNT(1) |
> +----------+
> | 522244 |
> +----------+
> 1 row selected (1.213 seconds)
> > select count(*) from test;
> +---------+
> | COUNT(1) |
> +----------+
> | 522245 |
> +----------+
> 1 row selected (1.23 seconds)
> {code}
>
> This was after I did some insert and a bunch of splits (but not in parallel).
> It's not, yet, clear under what circumstances that exactly happens. Just that after a while it happens.
> This is Phoenix built from master and HBase built from branch-2.3. (Client and server versions of HBase are matching)
--
This message was sent by Atlassian Jira
(v8.3.4#803005)