[ 
https://issues.apache.org/jira/browse/PHOENIX-5072?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17401226#comment-17401226
 ] 

ASF GitHub Bot commented on PHOENIX-5072:
-----------------------------------------

stoty commented on pull request #1287:
URL: https://github.com/apache/phoenix/pull/1287#issuecomment-900518362


   :broken_heart: **-1 overall**
   
   
   
   
   
   
   | Vote | Subsystem | Runtime | Comment |
   |:----:|----------:|--------:|:--------|
   | +0 :ok: |  reexec  |   6m 50s |  Docker mode activated.  |
   ||| _ Prechecks _ |
   | +1 :green_heart: |  dupname  |   0m  0s |  No case conflicting files 
found.  |
   | +1 :green_heart: |  hbaseanti  |   0m  0s |  Patch does not have any 
anti-patterns.  |
   | +1 :green_heart: |  @author  |   0m  0s |  The patch does not contain any 
@author tags.  |
   | -1 :x: |  test4tests  |   0m  0s |  The patch doesn't appear to include 
any new or modified tests. Please justify why no new tests are needed for this 
patch. Also please list what manual steps were performed to verify this patch.  
|
   ||| _ master Compile Tests _ |
   | +1 :green_heart: |  mvninstall  |  24m 37s |  master passed  |
   | +0 |  hbaserecompile  |  33m 42s |  HBase recompiled.  |
   | +1 :green_heart: |  compile  |   1m  7s |  master passed  |
   | +1 :green_heart: |  checkstyle  |   1m  5s |  master passed  |
   | +1 :green_heart: |  javadoc  |   0m 52s |  master passed  |
   | +0 :ok: |  spotbugs  |   3m 26s |  phoenix-core in master has 973 extant 
spotbugs warnings.  |
   ||| _ Patch Compile Tests _ |
   | +1 :green_heart: |  mvninstall  |  16m 51s |  the patch passed  |
   | +0 |  hbaserecompile  |  27m 19s |  HBase recompiled.  |
   | +1 :green_heart: |  compile  |   1m  6s |  the patch passed  |
   | +1 :green_heart: |  javac  |   1m  6s |  the patch passed  |
   | -1 :x: |  checkstyle  |   1m  7s |  phoenix-core: The patch generated 6 
new + 212 unchanged - 3 fixed = 218 total (was 215)  |
   | -1 :x: |  whitespace  |   0m  0s |  The patch 3 line(s) with tabs.  |
   | +1 :green_heart: |  javadoc  |   0m 51s |  the patch passed  |
   | +1 :green_heart: |  spotbugs  |   3m 29s |  the patch passed  |
   ||| _ Other Tests _ |
   | +1 :green_heart: |  unit  | 120m 59s |  phoenix-core in the patch passed.  
|
   | +1 :green_heart: |  asflicense  |   0m 13s |  The patch does not generate 
ASF License warnings.  |
   |  |   | 199m 53s |   |
   
   
   | Subsystem | Report/Notes |
   |----------:|:-------------|
   | Docker | ClientAPI=1.41 ServerAPI=1.41 base: 
https://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-PreCommit-GitHub-PR/job/PR-1287/1/artifact/yetus-general-check/output/Dockerfile
 |
   | GITHUB PR | https://github.com/apache/phoenix/pull/1287 |
   | Optional Tests | dupname asflicense javac javadoc unit spotbugs 
hbaserebuild hbaseanti checkstyle compile |
   | uname | Linux 1040f3c493cf 4.15.0-143-generic #147-Ubuntu SMP Wed Apr 14 
16:10:11 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux |
   | Build tool | maven |
   | Personality | dev/phoenix-personality.sh |
   | git revision | master / c4d297d |
   | Default Java | Private Build-1.8.0_242-8u242-b08-0ubuntu3~16.04-b08 |
   | checkstyle | 
https://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-PreCommit-GitHub-PR/job/PR-1287/1/artifact/yetus-general-check/output/diff-checkstyle-phoenix-core.txt
 |
   | whitespace | 
https://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-PreCommit-GitHub-PR/job/PR-1287/1/artifact/yetus-general-check/output/whitespace-tabs.txt
 |
   |  Test Results | 
https://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-PreCommit-GitHub-PR/job/PR-1287/1/testReport/
 |
   | Max. process+thread count | 9697 (vs. ulimit of 30000) |
   | modules | C: phoenix-core U: phoenix-core |
   | Console output | 
https://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-PreCommit-GitHub-PR/job/PR-1287/1/console
 |
   | versions | git=2.7.4 maven=3.3.9 spotbugs=4.1.3 |
   | Powered by | Apache Yetus 0.12.0 https://yetus.apache.org |
   
   
   This message was automatically generated.
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


> Cursor Query Loops Eternally with Local Index, Returns Fine Without It
> ----------------------------------------------------------------------
>
>                 Key: PHOENIX-5072
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-5072
>             Project: Phoenix
>          Issue Type: Bug
>    Affects Versions: 4.14.1, 5.2.0, 5.1.2
>            Reporter: Jack Steenkamp
>            Priority: Major
>         Attachments: PhoenixEternalCursorTest.java
>
>
>  
> I have come across a case where a particular cursor query would carry on 
> looping forever if executed when a local index is present. If however, I 
> execute the same query without a local index on the table, then it works as 
> expected.
> You can reproduce this by executing the attached  standalone test case. You 
> only need to modify the JDBC_URL constant (by default it tries to connect to 
> localhost) and then you compare the outputs between hving CREATE_INDEX = true 
> or CREATE_INDEX = false.
> Here is an example of the output: 
> *1) Connect to an environment and create a simple table:*
> {code:java}
> Connecting To : jdbc:phoenix:localhost:63214{code}
> {code:java}
> CREATE TABLE IF NOT EXISTS SOME_NUMBERS
> (
>    ID                             VARCHAR    NOT NULL,
>    NAME                           VARCHAR    ,
>    ANOTHER_VALUE                  VARCHAR    ,
>    TRANSACTION_TIME               TIMESTAMP  ,
>    CONSTRAINT pk PRIMARY KEY(ID)
> ) IMMUTABLE_STORAGE_SCHEME=ONE_CELL_PER_COLUMN,
> UPDATE_CACHE_FREQUENCY=900000,
> COLUMN_ENCODED_BYTES=NONE,
> IMMUTABLE_ROWS=true{code}
> *2) Optionally create a local index:*
>  
> If you want to reproduce the failure, create an index:
> {code:java}
> CREATE LOCAL INDEX index_01 ON SOME_NUMBERS(NAME, TRANSACTION_TIME DESC) 
> INCLUDE(ANOTHER_VALUE){code}
> Otherwise, skip this.
> *3) Insert a number of objects and verify their count*
> {code:java}
> System.out.println("\nInserting Some Items");
> DecimalFormat dmf = new DecimalFormat("0000");
> final String prefix = "ReferenceData.Country/";
> for (int i = 0; i < 5; i++)
> {
>   for (int j = 0; j < 2; j++)
>   {
>     PreparedStatement prstmt = conn.prepareStatement("UPSERT INTO 
> SOME_NUMBERS VALUES(?,?,?,?)");
>     prstmt.setString(1,UUID.randomUUID().toString());
>     prstmt.setString(2,prefix + dmf.format(i));
>     prstmt.setString(3,UUID.randomUUID().toString());
>     prstmt.setTimestamp(4, new Timestamp(System.currentTimeMillis()));
>     prstmt.execute();
>     conn.commit();3) Insert a number of objects and verify their count_
>     prstmt.close();
>   }
> }{code}
> Verify the count afterwards with: 
> {code:java}
> SELECT COUNT(1) AS TOTAL_ITEMS FROM SOME_NUMBERS {code}
> *5) Run a Cursor Query*
> Run a cursor using the standard sequence of commands as appropriate:
> {code:java}
> DECLARE MyCursor CURSOR FOR SELECT NAME,ANOTHER_VALUE FROM SOME_NUMBERS where 
> NAME like 'ReferenceData.Country/%' ORDER BY TRANSACTION_TIME DESC{code}
> {code:java}
> OPEN MyCursor{code}
> {code:java}
> FETCH NEXT 10 ROWS FROM MyCursor{code}
>  * Without an index it will return the correct number of rows
> {code:java}
> Cursor SQL : DECLARE MyCursor CURSOR FOR SELECT NAME,ANOTHER_VALUE FROM 
> SOME_NUMBERS where NAME like 'ReferenceData.Country/%' ORDER BY 
> TRANSACTION_TIME DESC
> CLOSING THE CURSOR
> Result : 0
> ITEMS returned by count : 10 | Items Returned by Cursor : 10
> ALL GOOD - No Exception{code}
>  * With an index it will return far more than the number of rows (it appears 
> to be erroneously looping for ever - hence the test-case terminates it).
> {code:java}
> Cursor SQL : DECLARE MyCursor CURSOR FOR SELECT NAME,ANOTHER_VALUE FROM 
> SOME_NUMBERS where NAME like 'ReferenceData.Country/%' ORDER BY 
> TRANSACTION_TIME DESC
> ITEMS returned by count : 10 | Items Returned by Cursor : 40
> Aborting the Cursor, as it is more than the count!
> Exception in thread "main" java.lang.RuntimeException: The cursor returned a 
> different number of rows from the count !! {code}
>  
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to