[
https://issues.apache.org/jira/browse/PHOENIX-1674?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15023485#comment-15023485
]
ASF GitHub Bot commented on PHOENIX-1674:
-----------------------------------------
Github user samarthjain commented on a diff in the pull request:
https://github.com/apache/phoenix/pull/133#discussion_r45683493
--- 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 --
Are we treating sequences specially? If I remember correctly, if you create
a table with connection timestamp as SCN, then the table becomes visible at SCN
+ 1. Has that changed?
> 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)