hawq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From iw...@apache.org
Subject [1/3] incubator-hawq git commit: HAWQ-295. New metadata flush strategy remove 1 entry every time flush due to flush condition wrong.
Date Mon, 04 Jan 2016 04:27:06 GMT
Repository: incubator-hawq
Updated Branches:
  refs/heads/master fde3b4fc9 -> daa452584


HAWQ-295. New metadata flush strategy remove 1 entry every time flush due to flush condition
wrong.


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

Branch: refs/heads/master
Commit: 4e64593a1ee5b07de0018aac30f037513975752b
Parents: 2ba5a19
Author: stanlyxiang <stanly.sxiang@gmail.com>
Authored: Wed Dec 30 17:17:29 2015 +0800
Committer: stanlyxiang <stanly.sxiang@gmail.com>
Committed: Wed Dec 30 17:17:29 2015 +0800

----------------------------------------------------------------------
 src/backend/cdb/cdbmetadatacache_process.c | 2 +-
 src/backend/utils/misc/guc.c               | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/4e64593a/src/backend/cdb/cdbmetadatacache_process.c
----------------------------------------------------------------------
diff --git a/src/backend/cdb/cdbmetadatacache_process.c b/src/backend/cdb/cdbmetadatacache_process.c
index 7da48d2..43cfd5b 100644
--- a/src/backend/cdb/cdbmetadatacache_process.c
+++ b/src/backend/cdb/cdbmetadatacache_process.c
@@ -443,7 +443,7 @@ ProcessMetadataCacheCheck()
             DestroyHdfsFileInfo(file_info);
             total_remove_files++;
 
-            double cache_entry_ratio = hash_get_num_entries(MetadataCache) / metadata_cache_max_hdfs_file_num;
+            double cache_entry_ratio = (hash_get_num_entries(MetadataCache) * 1.0) / metadata_cache_max_hdfs_file_num;
 
             if (((FREE_BLOCK_NUM * 1.0) / metadata_cache_block_capacity) >= metadata_cache_free_block_normal_ratio
             		&& cache_entry_ratio < metadata_cache_reduce_ratio)

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/4e64593a/src/backend/utils/misc/guc.c
----------------------------------------------------------------------
diff --git a/src/backend/utils/misc/guc.c b/src/backend/utils/misc/guc.c
index a08a812..43236b6 100644
--- a/src/backend/utils/misc/guc.c
+++ b/src/backend/utils/misc/guc.c
@@ -6548,7 +6548,7 @@ static struct config_int ConfigureNamesInt[] =
 				NULL
 		},
 		&metadata_cache_max_hdfs_file_num,
-		524288, 131072, 8388608, NULL, NULL
+		524288, 32768, 8388608, NULL, NULL
 	},
 
 	/* End-of-list marker */


Mime
View raw message