-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BugFix] Fix a bug that will lead no writable spill storage directories issue #53889
Conversation
aa85c99
to
9184f25
Compare
9184f25
to
cac52c1
Compare
Signed-off-by: duanyyyyyyy <[email protected]>
cac52c1
to
478c6e2
Compare
[Java-Extensions Incremental Coverage Report]✅ pass : 0 / 0 (0%) |
[FE Incremental Coverage Report]✅ pass : 0 / 0 (0%) |
[BE Incremental Coverage Report]✅ pass : 0 / 0 (0%) |
This is not a proper fix. see detail in #53925 |
The reason for the bug is the size increase twice and decrease only once I don't think the patch solve it.... |
here was the PoxisWriteableFile implements not Container::preallocate
|
I got it, U are right |
closed via #53925 |
Why I'm doing:
Fix a bug for be that will lead no writable spill storage directories issue
From the stack and code we can see that
W20241212 15:34:15.303994 139676325242624 pipeline_driver_executor.cpp:168] [Driver] Process error, query_id=7a9a93e1-b85b-11ef-99e1-d61caef69f96, instance_id=7a9a93e1-b85b-11ef-99e1-d61caef69f9a, status=Capaticy limit exceeded: no writable spill storage directories
be/src/exec/spill/log_block_manager.cpp:251 value_or_err_L251
be/src/exec/spill/data_stream.cpp:67 value_or_err_L67
be/src/exec/spill/data_stream.cpp:82 _prepare_block(state, total_write_size)
be/src/exec/spill/serde.cpp:159 output->append(state, {Slice(serialize_buffer.data(), written_bytes)}, written_bytes, chunk->num_rows())
be/src/exec/spill/mem_table.cpp:91 serde->serialize(_runtime_state, serde_ctx, chunk, output, need_aligned)
be/src/exec/spill/spill_components.cpp:478 mem_table->finalize(yield_ctx, output)
be/src/exec/spill/spill_components.cpp:503 spill_partition(yield_ctx, context, partition)
be/src/exec/spill/spill_components.cpp:686 _spill_input_partitions(ctx, spill_ctx, spilling_partitions)
be/src/exec/spill/spiller.hpp:40 task_status()
be/src/exec/hash_joiner.cpp:185 spiller()->spill(state, chunk, spill::ResourceMemTrackerGuard(tls_mem_tracker, state->query_ctx()->weak_from_this(), spiller()->weak_from_this()))
be/src/exec/pipeline/hashjoin/spillable_hash_join_build_operator.cpp:210 _join_builder->append_chunk_to_spill_buffer(state, spill_chunk)
in the acquire_writable_dir in dir_manager.cpp we will increase the size first
and in the log_block_manager.cpp we will decrease the size when LogBlockContainer is closed
And also in the log_block_manager.cpp when we append data we will also increase the size
So the bug comes.
And I added some log to provide the bug
in log_block_manger.cpp
in dir_manager.cpp
here is the log
The bug produce
What I'm doing:
Remove the
RETURN_IF_ERROR(_writable_file->pre_allocate(total_size));
in theappend_data
methodFixes #issue
What type of PR is this:
Does this PR entail a change in behavior?
If yes, please specify the type of change:
Checklist:
Bugfix cherry-pick branch check: