You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hawq.apache.org by iw...@apache.org on 2016/01/04 05:27:06 UTC

[1/3] incubator-hawq git commit: HAWQ-295. New metadata flush strategy remove 1 entry every time flush due to flush condition wrong.

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 <st...@gmail.com>
Authored: Wed Dec 30 17:17:29 2015 +0800
Committer: stanlyxiang <st...@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 */


[3/3] incubator-hawq git commit: HAWQ-295. New metadata flush strategy remove 1 entry every time flush due to flush condition wrong.

Posted by iw...@apache.org.
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/daa45258
Tree: http://git-wip-us.apache.org/repos/asf/incubator-hawq/tree/daa45258
Diff: http://git-wip-us.apache.org/repos/asf/incubator-hawq/diff/daa45258

Branch: refs/heads/master
Commit: daa45258436ee048b07df21aafb34bdd76c21c9c
Parents: fde3b4f 22b1f6e
Author: ivan <iw...@pivotal.io>
Authored: Mon Jan 4 12:26:51 2016 +0800
Committer: ivan <iw...@pivotal.io>
Committed: Mon Jan 4 12:26:51 2016 +0800

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


http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/daa45258/src/backend/utils/misc/guc.c
----------------------------------------------------------------------


[2/3] incubator-hawq git commit: HAWQ-295. New metadata flush strategy remove 1 entry every time flush due to flush condition wrong: change datatype cast.

Posted by iw...@apache.org.
HAWQ-295. New metadata flush strategy remove 1 entry every time flush due to flush condition wrong: change datatype cast.


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

Branch: refs/heads/master
Commit: 22b1f6e7c042df69248d4e23aaa00c52bc089c25
Parents: 4e64593
Author: stanlyxiang <st...@gmail.com>
Authored: Thu Dec 31 11:08:01 2015 +0800
Committer: stanlyxiang <st...@gmail.com>
Committed: Thu Dec 31 11:08:01 2015 +0800

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


http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/22b1f6e7/src/backend/cdb/cdbmetadatacache_process.c
----------------------------------------------------------------------
diff --git a/src/backend/cdb/cdbmetadatacache_process.c b/src/backend/cdb/cdbmetadatacache_process.c
index 43cfd5b..273923a 100644
--- a/src/backend/cdb/cdbmetadatacache_process.c
+++ b/src/backend/cdb/cdbmetadatacache_process.c
@@ -409,9 +409,9 @@ ProcessMetadataCacheCheck()
     RelFileNode rnode;
     HdfsFileInfo *file_info;
 
-    double free_block_ratio = (FREE_BLOCK_NUM * 1.0) / metadata_cache_block_capacity;
+    double free_block_ratio = ((double)FREE_BLOCK_NUM) / metadata_cache_block_capacity;
     long cache_entry_num = hash_get_num_entries(MetadataCache);
-    double cache_entry_ratio = (cache_entry_num * 1.0) / metadata_cache_max_hdfs_file_num;
+    double cache_entry_ratio = ((double)cache_entry_num) / metadata_cache_max_hdfs_file_num;
 
     elog(DEBUG1, "[MetadataCache] ProcessMetadataCacheCheck free_block_ratio:%f", free_block_ratio);
 
@@ -443,9 +443,9 @@ ProcessMetadataCacheCheck()
             DestroyHdfsFileInfo(file_info);
             total_remove_files++;
 
-            double cache_entry_ratio = (hash_get_num_entries(MetadataCache) * 1.0) / metadata_cache_max_hdfs_file_num;
+            double cache_entry_ratio = ((double)hash_get_num_entries(MetadataCache)) / metadata_cache_max_hdfs_file_num;
 
-            if (((FREE_BLOCK_NUM * 1.0) / metadata_cache_block_capacity) >= metadata_cache_free_block_normal_ratio
+            if ((((double)FREE_BLOCK_NUM) / metadata_cache_block_capacity) >= metadata_cache_free_block_normal_ratio
             		&& cache_entry_ratio < metadata_cache_reduce_ratio)
             {
                 break;