提交 95606c12 编写于 作者: A Ashwin Agrawal

Return early from distributed snapshot check if local xid is not normal.

Only normal xids can have distributed xids, so no point trying to check
distributed log and lookout for its corresponding distributed xid. Not sure how
much performance this impacts but its more important to not go chasing down
non-existent file, corresponding to frozen xids. Though currently for
distributed log it treats that as local transaction but just lot of extra work
to get that answer.
上级 4658177a
......@@ -37,6 +37,13 @@ DistributedSnapshotWithLocalMapping_CommittedTest(
bool found;
DistributedTransactionId distribXid = InvalidDistributedTransactionId;
/*
* Return early if local xid is not normal as it cannot have distributed
* xid associated with it.
*/
if (!TransactionIdIsNormal(localXid))
return DISTRIBUTEDSNAPSHOT_COMMITTED_IGNORE;
count = header->count;
/*
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册