MCPcopy Create free account
hub / github.com/apache/impala / StartSpilling

Method StartSpilling

be/src/runtime/query-state.cc:1071–1087  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1069}
1070
1071Status QueryState::StartSpilling(RuntimeState* runtime_state, MemTracker* mem_tracker) {
1072 // Return an error message with the root cause of why spilling is disabled.
1073 if (query_options().scratch_limit == 0) {
1074 return mem_tracker->MemLimitExceeded(
1075 runtime_state, "Could not free memory by spilling to disk: scratch_limit is 0");
1076 } else if (query_ctx_.disable_spilling) {
1077 return mem_tracker->MemLimitExceeded(runtime_state,
1078 "Could not free memory by spilling to disk: spilling was disabled by planner. "
1079 "Re-enable spilling by setting the query option DISABLE_UNSAFE_SPILLS=false");
1080 }
1081 // 'file_group_' must be non-NULL for spilling to be enabled.
1082 DCHECK(file_group_ != nullptr);
1083 if (query_spilled_.CompareAndSwap(0, 1)) {
1084 ImpaladMetrics::NUM_QUERIES_SPILLED->Increment(1);
1085 }
1086 return Status::OK();
1087}
1088}

Callers 6

AddRowMethod · 0.45
SpillMethod · 0.45
SpillMethod · 0.45
AppendProbeRowSlowMethod · 0.45
AddBatchMethod · 0.45
AddBatchMethod · 0.45

Calls 4

OKFunction · 0.85
MemLimitExceededMethod · 0.45
CompareAndSwapMethod · 0.45
IncrementMethod · 0.45

Tested by

no test coverage detected