fix: parquet table#446
Open
iaojnh wants to merge 10 commits into
Open
Conversation
| return ParquetBufferContextHandle(buffer_id, arrow); | ||
| } else { | ||
| // Drop the empty entry inserted by operator[] on the failed load path. | ||
| table_.erase(buffer_id); |
Collaborator
There was a problem hiding this comment.
这里的清理逻辑有点怪,acquire接口最好传递临时context,而不是table_[buffer_id]?
Collaborator
There was a problem hiding this comment.
并且acquire接口都声明为private
Collaborator
There was a problem hiding this comment.
set_block_acquired也声明为private
| } | ||
| } | ||
|
|
||
| std::shared_ptr<arrow::ChunkedArray> ParquetBufferPool::set_block_acquired( |
Collaborator
There was a problem hiding this comment.
set_block_acquired可以直接传入context,少一次map get
| if (context.ref_count.compare_exchange_weak( | ||
| current_count, current_count + 1, std::memory_order_acq_rel, | ||
| std::memory_order_acquire)) { | ||
| if (current_count == 0) { |
Collaborator
There was a problem hiding this comment.
这里为啥不直接把上面的current_count >=0 变为 current_count > 0 ? 另外current_count可能是负数吗?
| ParquetBufferContext &context = table_[buffer_id]; | ||
| ParquetBufferContext &context = iter->second; | ||
| int expected = 0; | ||
| if (context.ref_count.compare_exchange_strong( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
fix some bugs for parquet hash table.