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

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

Github user twdsilva commented on a diff in the pull request:

    https://github.com/apache/phoenix/pull/133#discussion_r45692528
  
    --- Diff: 
phoenix-core/src/main/java/org/apache/phoenix/schema/MetaDataClient.java ---
    @@ -1268,19 +1312,19 @@ public MutationState 
createIndex(CreateIndexStatement statement, byte[][] splits
                     // as there's no need to burn another sequence value.
                     if (allocateIndexId && indexId == null) {
                         Long scn = connection.getSCN();
    -                    long timestamp = scn == null ? 
HConstants.LATEST_TIMESTAMP : scn;
                         PName tenantId = connection.getTenantId();
                         String tenantIdStr = tenantId == null ? null : 
connection.getTenantId().getString();
                         PName physicalName = dataTable.getPhysicalName();
                         int nSequenceSaltBuckets = 
connection.getQueryServices().getSequenceSaltBuckets();
                         SequenceKey key = 
MetaDataUtil.getViewIndexSequenceKey(tenantIdStr, physicalName, 
nSequenceSaltBuckets);
    -                    // Create at parent timestamp as we know that will be 
earlier than now
    -                    // and earlier than any SCN if one is set.
    +                    // if scn is set create at scn-1, so we can see the 
sequence or else use latest timestamp (so that latest server time is used)
    +                    long sequenceTimestamp = scn!=null ? scn-1 : 
HConstants.LATEST_TIMESTAMP;
    --- End diff --
    
    No, we are just setting the timestamp at which the sequence correctly 
instead of based on the data table timestamp.
    This is required so that don't make unnesscary rpc calls while resolving a 
table.
    Previously we were just creating the sequence at the parent table 
tiemstamp,  which caused issues


> Snapshot isolation transaction support through Tephra
> -----------------------------------------------------
>
>                 Key: PHOENIX-1674
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-1674
>             Project: Phoenix
>          Issue Type: Improvement
>            Reporter: James Taylor
>              Labels: SFDC
>
> Tephra (http://tephra.io/ and https://github.com/caskdata/tephra) is one 
> option for getting transaction support in Phoenix. Let's use this JIRA to 
> discuss the way in which this could be integrated along with the pros and 
> cons.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to