[
https://issues.apache.org/jira/browse/PHOENIX-1257?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14142969#comment-14142969
]
Gabriel Reid commented on PHOENIX-1257:
---------------------------------------
I've just taken a look at this. I added the following at MutationState:343
{code}logger.debug("timestamp for mutations: " +
Longs.asList(serverTimeStamps));{code}
and ran the integration test.
This gives the following (filtered) logging:
{code}
09:05:46,020 DEBUG ChunkedResultIterator(86): Get first chunked result iterator
over FOO with
{"timeRange":[0,1411369546012],"batch":-1,"startRow":"","stopRow":"","loadColumnFamiliesOnDemand":null,"totalColumns":1,"cacheBlocks":true,"families":{"0":["ALL"]},"maxResultSize":-1,"maxVersions":1,"filter":"","caching":1000}
64
09:05:46,057 DEBUG ChunkedResultIterator(117): Get next chunked result iterator
over FOO with
{"timeRange":[0,1411369546012],"batch":-1,"startRow":"\\x80\\x00\\x004","stopRow":"","loadColumnFamiliesOnDemand":null,"totalColumns":1,"cacheBlocks":true,"families":{"0":["ALL"]},"maxResultSize":-1,"maxVersions":1,"filter":"","caching":1000}
09:05:46,091 DEBUG ChunkedResultIterator(117): Get next chunked result iterator
over FOO with
{"timeRange":[0,1411369546012],"batch":-1,"startRow":"\\x80\\x00\\x00g","stopRow":"","loadColumnFamiliesOnDemand":null,"totalColumns":1,"cacheBlocks":true,"families":{"0":["ALL"]},"maxResultSize":-1,"maxVersions":1,"filter":"","caching":1000}
09:05:46,110 DEBUG MutationState(343): timestamp for mutations: [1411369546009]
{code}
Note that the timestamp for mutation (1411369546009) is less than the end of
the time range being used for the scan (0,1411369546012).
The endless loop occurs once the chunked scan has to re-start scanning after
the commit buffer has been written starting at a lower row key than where the
previous scan chunk left off.
I take it that both timestamps should be coming from the same place, so I guess
this is a question of ensuring that that is the case.
> Strange behavior wirh "upsert into ... select from ..." with sequences
> ----------------------------------------------------------------------
>
> Key: PHOENIX-1257
> URL: https://issues.apache.org/jira/browse/PHOENIX-1257
> Project: Phoenix
> Issue Type: Bug
> Reporter: Lars Hofhansl
> Attachments: 1257-test.txt
>
>
> I have the following scenario:
> create sequence keys;
> create table X (pk unsigned_long primary key, val integer);
> upsert into x values (1,1);
> Followed by repeated:
> upsert into x select next value for keys, val from x;
> This works well until 2048 rows are inserted. The next
> upsert into x select next value for keys, val from x;
> That loops forever inserting more and more rows until it is stopped.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)