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

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

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

    https://github.com/apache/phoenix/pull/127#discussion_r44852697
  
    --- Diff: 
phoenix-core/src/main/java/org/apache/phoenix/schema/MetaDataClient.java ---
    @@ -1498,30 +1542,61 @@ private PTable 
createTableInternal(CreateTableStatement statement, byte[][] spli
                 long clientTimeStamp = scn == null ? 
HConstants.LATEST_TIMESTAMP : scn;
                 boolean multiTenant = false;
                 boolean storeNulls = false;
    +            boolean transactional = false;
                 Integer saltBucketNum = null;
                 String defaultFamilyName = null;
                 boolean isImmutableRows = false;
                 List<PName> physicalNames = Collections.emptyList();
                 boolean addSaltColumn = false;
                 boolean rowKeyOrderOptimizable = true;
    +                   Long timestamp = null;
                 if (parent != null && tableType == PTableType.INDEX) {
    -                // Index on view
    -                // TODO: Can we support a multi-tenant index directly on a 
multi-tenant
    -                // table instead of only a view? We don't have anywhere to 
put the link
    -                // from the table to the index, though.
    -                if (indexType == IndexType.LOCAL || (parent.getType() == 
PTableType.VIEW && parent.getViewType() != ViewType.MAPPED)) {
    -                    PName physicalName = parent.getPhysicalName();
    -                    saltBucketNum = parent.getBucketNum();
    -                    addSaltColumn = (saltBucketNum != null && indexType != 
IndexType.LOCAL);
    -                    defaultFamilyName = parent.getDefaultFamilyName() == 
null ? null : parent.getDefaultFamilyName().getString();
    -                    if (indexType == IndexType.LOCAL) {
    -                        saltBucketNum = null;
    -                        // Set physical name of local index table
    -                        physicalNames = 
Collections.singletonList(PNameFactory.newName(MetaDataUtil.getLocalIndexPhysicalName(physicalName.getBytes())));
    -                    } else {
    -                        // Set physical name of view index table
    -                        physicalNames = 
Collections.singletonList(PNameFactory.newName(MetaDataUtil.getViewIndexPhysicalName(physicalName.getBytes())));
    +                   transactional = parent.isTransactional();
    +                timestamp = TransactionUtil.getTableTimestamp(connection, 
transactional);
    +                storeNulls = parent.getStoreNulls();
    +                if (tableType == PTableType.INDEX) {
    +                   // Index on view
    +                   // TODO: Can we support a multi-tenant index directly 
on a multi-tenant
    +                   // table instead of only a view? We don't have anywhere 
to put the link
    +                   // from the table to the index, though.
    +                   if (indexType == IndexType.LOCAL || (parent.getType() 
== PTableType.VIEW && parent.getViewType() != ViewType.MAPPED)) {
    +                       PName physicalName = parent.getPhysicalName();
    +                       saltBucketNum = parent.getBucketNum();
    +                       addSaltColumn = (saltBucketNum != null && indexType 
!= IndexType.LOCAL);
    +                       defaultFamilyName = parent.getDefaultFamilyName() 
== null ? null : parent.getDefaultFamilyName().getString();
    +                       if (indexType == IndexType.LOCAL) {
    +                           saltBucketNum = null;
    +                           // Set physical name of local index table
    +                           physicalNames = 
Collections.singletonList(PNameFactory.newName(MetaDataUtil.getLocalIndexPhysicalName(physicalName.getBytes())));
    +                       } else {
    +                           // Set physical name of view index table
    +                           physicalNames = 
Collections.singletonList(PNameFactory.newName(MetaDataUtil.getViewIndexPhysicalName(physicalName.getBytes())));
    +                       }
                         }
    +    
    --- End diff --
    
    Double check this part of the merge, as this diff looks funny - why'd all 
these lines get added?


> 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