fix no spill size problem in parallel hash mod
This commit is contained in:
@ -582,3 +582,8 @@ static void sts_filename(char* name, size_t length, SharedTuplestoreAccessor* ac
|
||||
error_t rc = snprintf_s(name, length, length - 1, "%s.p%d", accessor->sts->name, participant);
|
||||
securec_check_ss(rc, "", "");
|
||||
}
|
||||
|
||||
uint64 get_header_size(SharedTuplestoreAccessor* accessor)
|
||||
{
|
||||
return (uint64)accessor->sts->meta_data_size;
|
||||
}
|
||||
|
@ -4014,8 +4014,9 @@ static void check_report_parameter(report_params* params)
|
||||
*/
|
||||
if (!g_instance.attr.attr_common.PGXCNodeName || g_instance.attr.attr_common.PGXCNodeName[0] == '\0') {
|
||||
currentNodeName = "unknown name";
|
||||
} else {
|
||||
currentNodeName = g_instance.attr.attr_common.PGXCNodeName;
|
||||
}
|
||||
currentNodeName = g_instance.attr.attr_common.PGXCNodeName;
|
||||
|
||||
if ((strncmp(params->report_scope, g_nodeScope, strlen(g_nodeScope)) == 0) &&
|
||||
((params->report_node == NULL) ||
|
||||
|
@ -30,6 +30,7 @@
|
||||
#include "commands/tablespace.h"
|
||||
#include "executor/execdebug.h"
|
||||
#include "executor/hashjoin.h"
|
||||
#include "utils/sharedtuplestore.h"
|
||||
#include "executor/nodeHash.h"
|
||||
#include "executor/nodeHashjoin.h"
|
||||
#include "miscadmin.h"
|
||||
@ -1782,6 +1783,8 @@ retry:
|
||||
Assert(hashtable->batches[batchno].preallocated >= tuple_size);
|
||||
hashtable->batches[batchno].preallocated -= tuple_size;
|
||||
sts_puttuple(hashtable->batches[batchno].inner_tuples, &hashvalue, tuple);
|
||||
hashtable->spill_count += 1;
|
||||
*hashtable->spill_size += get_header_size(hashtable->batches[batchno].inner_tuples) + tuple->t_len;
|
||||
}
|
||||
++hashtable->batches[batchno].ntuples;
|
||||
}
|
||||
|
@ -48,4 +48,5 @@ extern void sts_puttuple(SharedTuplestoreAccessor* accessor, const void* meta_da
|
||||
|
||||
extern MinimalTuple sts_parallel_scan_next(SharedTuplestoreAccessor* accessor, void* meta_data);
|
||||
|
||||
extern uint64 get_header_size(SharedTuplestoreAccessor* accessor);
|
||||
#endif /* SHAREDTUPLESTORE_H */
|
||||
|
Reference in New Issue
Block a user