hawq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From m..@apache.org
Subject incubator-hawq git commit: HAWQ-812. only hdfs file/dir can be skipped at recovery PASS3
Date Mon, 04 Jul 2016 02:30:03 GMT
Repository: incubator-hawq
Updated Branches:
  refs/heads/master 497ae5db9 -> b4993b2be


HAWQ-812. only hdfs file/dir can be skipped at recovery PASS3


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

Branch: refs/heads/master
Commit: b4993b2be310fdfaa19b1502ed76c19bd652e361
Parents: 497ae5d
Author: Ming LI <mli@pivotal.io>
Authored: Thu Jun 30 18:34:36 2016 +0800
Committer: Ming LI <mli@pivotal.io>
Committed: Mon Jul 4 10:28:59 2016 +0800

----------------------------------------------------------------------
 src/backend/cdb/cdbmirroredbufferpool.c         |  4 +--
 .../cdb/cdbresynchronizechangetracking.c        | 37 ++++++++++++--------
 2 files changed, 24 insertions(+), 17 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/b4993b2b/src/backend/cdb/cdbmirroredbufferpool.c
----------------------------------------------------------------------
diff --git a/src/backend/cdb/cdbmirroredbufferpool.c b/src/backend/cdb/cdbmirroredbufferpool.c
index 94f8a33..8799912 100644
--- a/src/backend/cdb/cdbmirroredbufferpool.c
+++ b/src/backend/cdb/cdbmirroredbufferpool.c
@@ -137,7 +137,7 @@ static void MirroredBufferPool_DoOpen(
 		if (segmentFileNum == 0)
 			sprintf(path, "%s/%u", dbPath, relFileNode->relNode);
 		else
-			sprintf(path, "%s/%u.%u", dbPath, relFileNode->relNode, segmentFileNum);
+			sprintf(path, "%s/%u/%u", dbPath, relFileNode->relNode, segmentFileNum);
 
 		errno = 0;
 		
@@ -469,7 +469,7 @@ static void MirroredBufferPool_DoDrop(
 		if (segmentFileNum == 0)
 			sprintf(path, "%s/%u", dbPath, relFileNode->relNode);
 		else
-			sprintf(path, "%s/%u.%u", dbPath, relFileNode->relNode, segmentFileNum);
+			sprintf(path, "%s/%u/%u", dbPath, relFileNode->relNode, segmentFileNum);
 
 		errno = 0;
 		

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/b4993b2b/src/backend/cdb/cdbresynchronizechangetracking.c
----------------------------------------------------------------------
diff --git a/src/backend/cdb/cdbresynchronizechangetracking.c b/src/backend/cdb/cdbresynchronizechangetracking.c
index e25ad0a..ba6bcfa 100644
--- a/src/backend/cdb/cdbresynchronizechangetracking.c
+++ b/src/backend/cdb/cdbresynchronizechangetracking.c
@@ -201,23 +201,30 @@ void ChangeTracking_GetRelationChangeInfoFromXlog(
 		case RM_MMXLOG_ID:
 			switch (info)
 			{
-				// relation dirs and node files create/drop need to be tracked down
-                // so that we can skip at recovery pass3
-                case MMXLOG_CREATE_DIR:
-				case MMXLOG_CREATE_FILE:
-                case MMXLOG_REMOVE_DIR:
+				// relation dirs and node files create/drop on hdfs need to be tracked down
+				// so that we can skip at recovery pass3
+				case MMXLOG_CREATE_DIR:
+				case MMXLOG_REMOVE_DIR:
 				case MMXLOG_REMOVE_FILE:
+				case MMXLOG_CREATE_FILE:
 				{
-					xl_heap_freeze *xlrec = (xl_heap_freeze *) data;
-
-					ChangeTracking_AddRelationChangeInfo(
-													   relationChangeInfoArray,
-													   relationChangeInfoArrayCount,
-													   relationChangeInfoMaxSize,
-													   &(xlrec->heapnode.node),
-													   InvalidBlockNumber,
-													   &xlrec->heapnode.persistentTid,
-													   xlrec->heapnode.persistentSerialNum);
+					xl_mm_fs_obj *xlrec = (xl_mm_fs_obj *) data;
+					if(xlrec->shared) // it is hdfs
+					{
+						// Only hdfs file/dir need to be skip
+						RelFileNode rfn;
+						rfn.spcNode = xlrec->tablespace;
+						rfn.dbNode = xlrec->database;
+						rfn.relNode = xlrec->relfilenode;
+						ChangeTracking_AddRelationChangeInfo(
+															relationChangeInfoArray,
+															relationChangeInfoArrayCount,
+															relationChangeInfoMaxSize,
+															&(rfn),
+															InvalidBlockNumber,
+															&xlrec->persistentTid,
+															xlrec->persistentSerialNum);
+					}
 					break;
 				}
 				default:


Mime
View raw message