phoenix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Maddineni Sukumar (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (PHOENIX-3209) Ensure scans run at specific server timestamp for UPSERT SELECT to same table
Date Wed, 17 May 2017 17:02:04 GMT

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

Maddineni Sukumar commented on PHOENIX-3209:
--------------------------------------------

Hi [~jamestaylor] / [~samarthjain],  

I am able to reproduce scenario where if we use update_cache_frequency and upsert select on
same table then we are running scan with time range 0 to Long.MAX_VALUE,  so we are able to
see future data or data created during query execution. Reason for this is we are getting
table from cache with resolved timestamp as -1(UNSET_TIMESTAMP). So we are not setting end
time for time range and it is using default value which is Long.MAX_VALUE. 
I added logic to do force cache update in case of upsert select on same table.  
Added patch in PHOENIX-3823  patch as it was easy adding unit test there. 
I think we need to do this logic for all upsert select scenarios irrespective of same table
or not. I will run some more tests today. Please confirm. 

> Ensure scans run at specific server timestamp for UPSERT SELECT to same table
> -----------------------------------------------------------------------------
>
>                 Key: PHOENIX-3209
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-3209
>             Project: Phoenix
>          Issue Type: Sub-task
>            Reporter: James Taylor
>            Assignee: Maddineni Sukumar
>             Fix For: 4.11.0
>
>
> This is a corner case of specifying an UPDATE_CACHE_FREQUENCY on a table and executing
an UPSERT SELECT. Without an UPDATE_CACHE_FREQUENCY, we ping the server to ensure we have
the latest version of the schema. We'll then run the query based on the server timestamp returned
as a result of checking that the schema is up-to-date. If an UPDATE_CACHE_FREQUENCY is set,
we skip this RPC which is a potential problem in this case. This becomes more likely when
we introduce a default UPATE_CACHE_FREQUENCY with PHOENIX-2885. The fix is to ignore the UPDATE_CACHE_FREQUENCY
when an UPSERT SELECT is performed where the source and target table are the same.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Mime
View raw message