Skip to content
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

chore: use dashmap replace hashmap #16426

Closed
wants to merge 2 commits into from
Closed

Conversation

zhyass
Copy link
Member

@zhyass zhyass commented Sep 9, 2024

I hereby agree to the terms of the CLA available at: https://docs.databend.com/dev/policies/cla/

Summary

Use DashMap replace the Mutex<HashMap> and RwLock<HashMap> to make the code more clearly.

DashMap is an implementation of a concurrent associative array/hashmap in Rust.

Tests

  • Unit Test
  • Logic Test
  • Benchmark Test
  • No Test - Explain why

Type of change

  • Bug Fix (non-breaking change which fixes an issue)
  • New Feature (non-breaking change which adds functionality)
  • Breaking Change (fix or feature that could cause existing functionality not to work as expected)
  • Documentation Update
  • Refactoring
  • Performance Improvement
  • Other (please describe):

This change is Reviewable

@dosubot dosubot bot added the size:L This PR changes 100-499 lines, ignoring generated files. label Sep 9, 2024
@zhyass zhyass marked this pull request as draft September 9, 2024 12:54
@github-actions github-actions bot added the pr-chore this PR only has small changes that no need to record, like coding styles. label Sep 9, 2024
@dosubot dosubot bot added the A-query Area: databend query label Sep 9, 2024
@zhyass zhyass added the ci-benchmark Benchmark: run all test label Sep 9, 2024
Copy link
Contributor

github-actions bot commented Sep 9, 2024

Docker Image for PR

  • tag: pr-16426-42614b8-1725891266

note: this image tag is only available for internal use,
please check the internal doc for more details.

@zhyass zhyass changed the title chore: lock use dashmap chore: use dashmap replace hashmap Sep 9, 2024
@zhyass zhyass marked this pull request as ready for review September 9, 2024 15:15
@zhyass zhyass added ci-benchmark Benchmark: run all test and removed ci-benchmark Benchmark: run all test labels Sep 9, 2024
Copy link
Contributor

github-actions bot commented Sep 9, 2024

Docker Image for PR

  • tag: pr-16426-d1dda6e-1725897114

note: this image tag is only available for internal use,
please check the internal doc for more details.

@zhang2014
Copy link
Member

Recommended to replace only the hashmap in the lock manager.

@zhyass zhyass closed this Sep 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-query Area: databend query ci-benchmark Benchmark: run all test pr-chore this PR only has small changes that no need to record, like coding styles. size:L This PR changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants