Github user hsyuan commented on a diff in the pull request:

    https://github.com/apache/incubator-hawq/pull/845#discussion_r76369259
  
    --- Diff: src/backend/cdb/cdbdatalocality.c ---
    @@ -3791,12 +3791,27 @@ run_allocation_algorithm(SplitAllocResult *result, 
List *virtual_segments, Query
                targetPolicy = GpPolicyFetch(CurrentMemoryContext, myrelid);
                bool isRelationHash = is_relation_hash(targetPolicy);
     
    +           int fileCountInRelation = list_length(rel_data->files);
    +           bool FileCountBucketNumMismatch = false;
    +           if (targetPolicy->bucketnum > 0) {
    +             FileCountBucketNumMismatch = fileCountInRelation %
    +               targetPolicy->bucketnum == 0 ? false : true;
    +           }
    +           if (FileCountBucketNumMismatch && 
!allow_file_count_bucket_num_mismatch) {
    +             elog(ERROR, "file count %d in catalog is not in proportion to 
the bucket "
    +                 "number %d of hash table with oid=%u, some data may be 
lost, if you "
    --- End diff --
    
    number %d of distribution policy for table with oid = %u, some data may be 
missing or invalid.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to