hawq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bhuvnesh2...@apache.org
Subject [08/12] incubator-hawq git commit: HAWQ-627. Fix core dump in metadata cache
Date Wed, 06 Apr 2016 03:42:06 GMT
HAWQ-627. Fix core dump in metadata cache


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

Branch: refs/heads/HAWQ-617
Commit: fa2600cfbf24d193a63f25e3286e238278348c6d
Parents: ec8e791
Author: ivan <iweng@pivotal.io>
Authored: Tue Apr 5 14:15:14 2016 +0800
Committer: ivan <iweng@pivotal.io>
Committed: Tue Apr 5 14:15:14 2016 +0800

----------------------------------------------------------------------
 src/backend/cdb/cdbmetadatacache_process.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/fa2600cf/src/backend/cdb/cdbmetadatacache_process.c
----------------------------------------------------------------------
diff --git a/src/backend/cdb/cdbmetadatacache_process.c b/src/backend/cdb/cdbmetadatacache_process.c
index 6d1292c..7553d09 100644
--- a/src/backend/cdb/cdbmetadatacache_process.c
+++ b/src/backend/cdb/cdbmetadatacache_process.c
@@ -326,14 +326,14 @@ GenerateMetadataCacheLRUList()
 {
     HASH_SEQ_STATUS hstat;
     MetadataCacheEntry *entry;
-    long cache_entry_num = hash_get_num_entries(MetadataCache);
+    long cache_entry_num = 0;
 
     LWLockAcquire(MetadataCacheLock, LW_EXCLUSIVE);
+    cache_entry_num = hash_get_num_entries(MetadataCache);
 
-    if (MetadataCacheLRUList)
-    {
-        list_free_deep(MetadataCacheLRUList);
-        MetadataCacheLRUList = NULL;
+    if (cache_entry_num == 0) {
+        LWLockRelease(MetadataCacheLock);
+        return;
     }
 
     MetadataCacheEntry** entry_vector = (MetadataCacheEntry**)palloc(sizeof(MetadataCacheEntry*)
* cache_entry_num);   


Mime
View raw message