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
coprocessor: use mur3 to calculate fmsketch #14204
Conversation
[REVIEW NOTIFICATION] This pull request has been approved by:
To complete the pull request process, please ask the reviewers in the list to review by filling The full list of commands accepted by this bot can be found here. Reviewer can indicate their review by submitting an approval review. |
46d878d
to
5d78717
Compare
Cargo.toml
Outdated
@@ -117,6 +117,7 @@ match-template = "0.0.1" | |||
memory_trace_macros = { workspace = true } | |||
mime = "0.3.13" | |||
more-asserts = "0.2" | |||
mur3 = "0.1" | |||
murmur3 = "0.5.1" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can this be removed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. Fixed.
Signed-off-by: xuyifan <675434007@qq.com>
Signed-off-by: xuyifan <675434007@qq.com>
/run-build |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rest LGTM
} | ||
self.fm_sketches[col_len + i].insert_hash_value(hasher.finish()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks a little bit suspicious to me that we are using different ways of computation for len = 1 and len != 1, I don't think it's consistent with the previous way of computation...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As mur3 doc suggests, Hasher version(Hasher128
) is a little slower than the function version murmurhash3_x64_128
. Hence, when len = 1, we use the faster one(murmurhash3_x64_128
), while when len > 1, we use Hasher128
to avoid concating byte slices.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any performance difference?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see. LGTM
/merge |
@xuyifangreeneyes: It seems you want to merge this PR, I will help you trigger all the tests: /run-all-tests You only need to trigger If you have any questions about the PR merge process, please refer to pr process. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the ti-community-infra/tichi repository. |
@xuyifangreeneyes: In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the ti-community-infra/tichi repository. |
/merge |
@sticnarf: It seems you want to merge this PR, I will help you trigger all the tests: /run-all-tests You only need to trigger If you have any questions about the PR merge process, please refer to pr process. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the ti-community-infra/tichi repository. |
This pull request has been accepted and is ready to merge. Commit hash: b764980
|
* json, copr: implement unary not for json (tikv#14070) close tikv#14069 Signed-off-by: YangKeao <yangkeao@chunibyo.icu> Co-authored-by: Ti Chi Robot <ti-community-prow-bot@tidb.io> * copr: (refactor) Lift heap struct out from top_n_executor (tikv#14096) ref tikv#13936 Signed-off-by: Zhi Qi <qizhi@pingcap.com> * copr: (feat) Implement operator PartitionTopN (tikv#14116) ref tikv#13936 Signed-off-by: Zhi Qi <qizhi@pingcap.com> Co-authored-by: Ti Chi Robot <ti-community-prow-bot@tidb.io> * copr: fix error when cast const Enum to any type (tikv#14149) close tikv#14156, close pingcap/tidb#40341 copr: fix error when cast const Enum to any type Co-authored-by: Ti Chi Robot <ti-community-prow-bot@tidb.io> * coprocessor: use mur3 to calculate fmsketch (tikv#14204) ref tikv#14231 Signed-off-by: xuyifan <675434007@qq.com> * copr: early stop paging copr when resultset is drained. (tikv#14209) close tikv#14254 When the result set is drained, it indicates that no more data is required in the range. This PR set the scanned range to None to avoid the following paging requests in the current range. Co-authored-by: Ti Chi Robot <ti-community-prow-bot@tidb.io> * coprocessor: avoid unnecessary vec allocation in collect_column_stats (tikv#14280) ref tikv#14231 When collect_column_stats handles each row, reuse column_vals and collation_key_vals to avoid allocating many small objects. Signed-off-by: xuyifan <675434007@qq.com> * copr: (enhance) support executor limit with partition_by fields (tikv#14359) ref tikv#13936 Signed-off-by: Zhi Qi <qizhi@pingcap.com> * coprocessor: reuse EvalContext in collect_column_stats (tikv#14376) ref tikv#14231 Signed-off-by: xuyifan <675434007@qq.com> * copr: fix extral physical table id when idx key < `MAX_OLD_ENCODED_VALUE_LEN` (tikv#14618) close tikv#14619 fix a bug with `process_old_collation_kv` function. related with tikv#11931, forget process `physical_table_id_column_cnt` in process_old_collation_kv function Signed-off-by: Jason Mo <mohangjie1995@gmail.com> Co-authored-by: Ti Chi Robot <ti-community-prow-bot@tidb.io> --------- Signed-off-by: Zhi Qi <qizhi@pingcap.com> Signed-off-by: xuyifan <675434007@qq.com> Co-authored-by: YangKeao <yangkeao@chunibyo.icu> Co-authored-by: Ti Chi Robot <ti-community-prow-bot@tidb.io> Co-authored-by: Zhi Qi <30543181+LittleFall@users.noreply.github.com> Co-authored-by: Shenghui Wu <793703860@qq.com> Co-authored-by: Yifan Xu <30385241+xuyifangreeneyes@users.noreply.github.com> Co-authored-by: you06 <you1474600@gmail.com> Co-authored-by: Hangjie Mo <mohangjie1995@gmail.com>
Signed-off-by: xuyifangreeneyes xuyifangreeneyes@gmail.com
What is changed and how it works?
Issue Number: ref #14231
What's Changed:
Use https://github.com/tikv/mur3 to calculate fmsketch, which is more efficient.
Related changes
pingcap/docs
/pingcap/docs-cn
:Check List
Tests
Before the PR:
After the PR:
Also, I tested end-to-end analyze commands on OSSInsight data. The analyze time is reduced from 702s to 650s.
Side effects
Release note