hawq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cjcjame...@apache.org
Subject [79/80] [abbrv] incubator-hawq git commit: HAWQ-835. Fix snapshot during transaction processing for cannot retrieve tuple from temp table created in function
Date Wed, 29 Jun 2016 01:21:37 GMT
HAWQ-835. Fix snapshot during transaction processing for cannot retrieve tuple from temp table
created in function


Project: http://git-wip-us.apache.org/repos/asf/incubator-hawq/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-hawq/commit/09dba2e1
Tree: http://git-wip-us.apache.org/repos/asf/incubator-hawq/tree/09dba2e1
Diff: http://git-wip-us.apache.org/repos/asf/incubator-hawq/diff/09dba2e1

Branch: refs/heads/HAWQ-537
Commit: 09dba2e178070bf82f0e90cc1d57e0af5dfffcb4
Parents: 5d4c8d0
Author: Ruilong Huo <rhuo@pivotal.io>
Authored: Tue Jun 28 10:53:35 2016 +0800
Committer: Ruilong Huo <rhuo@pivotal.io>
Committed: Tue Jun 28 15:11:33 2016 +0800

----------------------------------------------------------------------
 src/backend/cdb/cdbdatalocality.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/09dba2e1/src/backend/cdb/cdbdatalocality.c
----------------------------------------------------------------------
diff --git a/src/backend/cdb/cdbdatalocality.c b/src/backend/cdb/cdbdatalocality.c
index adcc3b8..c56232c 100644
--- a/src/backend/cdb/cdbdatalocality.c
+++ b/src/backend/cdb/cdbdatalocality.c
@@ -854,7 +854,10 @@ int64 get_block_locations_and_claculte_table_size(split_to_segment_mapping_conte
 
 	MemoryContextSwitchTo(context->datalocality_memorycontext);
 
-	ActiveSnapshot = GetTransactionSnapshot();
+	if (ActiveSnapshot == NULL)
+	{
+		ActiveSnapshot = GetTransactionSnapshot();
+	}
 	ActiveSnapshot = CopySnapshot(ActiveSnapshot);
 	ActiveSnapshot->curcid = GetCurrentCommandId();
 


Mime
View raw message