Skip to content

Make NodeMap Thread-safe#487

Open
am357 wants to merge 5 commits intomainfrom
feat-threadsafe-nodemap
Open

Make NodeMap Thread-safe#487
am357 wants to merge 5 commits intomainfrom
feat-threadsafe-nodemap

Conversation

@am357
Copy link
Copy Markdown
Contributor

@am357 am357 commented Aug 14, 2024

Description of changes:

Makes the NodeMap thread-safe; this is a per-requisite for using the structure in the PartiQLShapeBuilder. It uses DashMap and Vec under the hood. It uses the Vec for preserving the ordering as the previous implementation was using IndexMap. IndexMap does not seem to be thread-safe.

The PR also makes necessary changes to preserve the behavior of the current NodeMap dependencies.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

am357 added 5 commits August 12, 2024 16:27
This PR
- adds `NodeId` to `StaticType`.
- makes `AutoNodeIdGenerator` thread-safe
- adds `PartiqlShapeBuilder` and moves some `PartiqlShape` APIs to it; this is to be able to generate unique `NodeId`s for a `PartiqlShape` that includes static types that themselves can include other static types.
- adds a static thread safe `shape_builder` function that provides a convenient way for using `PartiqlShapeBuilder` for creating new shapes.
- prepends existing type macros with `type` such as `type_int!` to make macro names more friendly.
- removes `const` PartiQL types under `partiql-types` in favor of `PartiqlShapeBuilder`.
@am357 am357 marked this pull request as ready for review August 14, 2024 22:33
@am357 am357 requested a review from jpschorr August 14, 2024 22:33
@codecov
Copy link
Copy Markdown

codecov Bot commented Aug 14, 2024

Codecov Report

❌ Patch coverage is 61.53846% with 10 lines in your changes missing coverage. Please review.
✅ Project coverage is 80.95%. Comparing base (7203852) to head (28fed58).
⚠️ Report is 74 commits behind head on main.

Files with missing lines Patch % Lines
partiql-common/src/node.rs 61.53% 10 Missing ⚠️

❌ Your patch check has failed because the patch coverage (61.53%) is below the target coverage (85.00%). You can increase the patch coverage or adjust the target coverage.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #487      +/-   ##
==========================================
- Coverage   80.98%   80.95%   -0.03%     
==========================================
  Files          69       69              
  Lines       18796    18822      +26     
  Branches    18796    18822      +26     
==========================================
+ Hits        15221    15237      +16     
- Misses       3131     3141      +10     
  Partials      444      444              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@github-actions
Copy link
Copy Markdown

Conformance comparison report

Base (7203852) f286311 +/-
% Passing 90.35% 90.35% 0.00%
✅ Passing 5731 5731 0
❌ Failing 612 612 0
🔶 Ignored 0 0 0
Total Tests 6343 6343 0

Number passing in both: 5731

Number failing in both: 612

Number passing in Base (7203852) but now fail: 0

Number failing in Base (7203852) but now pass: 0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant