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

feat(indexing)!: Use UUIDv3 for indexing node ids #277

Merged
merged 2 commits into from
Sep 6, 2024

Conversation

timonv
Copy link
Member

@timonv timonv commented Sep 6, 2024

Use UUIDv3 to generate node ids for storage and cache. This is more reliable than the previous u64 hashing, with less chance for collision. Additionally, the previous hash algorithm changes over Rust releases and should not be used.

Closes #272 and needed for proper Rust 1.81 support as in #275

BREAKING CHANGE: All generated ids are now UUIDs, meaning all persisted data needs to be purged or manually updated, as default upserts will fail. There is no backwards compatibility.

@timonv timonv changed the title feat!(indexing): Use UUIDv3 for indexing node ids feat(indexing)!: Use UUIDv3 for indexing node ids Sep 6, 2024
@timonv timonv force-pushed the feat/uuid-indexing-nodes branch from bfd52bc to 546a66b Compare September 6, 2024 16:24
@timonv timonv merged commit 57fe4aa into master Sep 6, 2024
6 checks passed
@timonv timonv deleted the feat/uuid-indexing-nodes branch September 6, 2024 17:15
timonv pushed a commit that referenced this pull request Sep 6, 2024
## 🤖 New release
* `swiftide`: 0.9.2 -> 0.10.0
* `swiftide-core`: 0.9.2 -> 0.10.0
* `swiftide-indexing`: 0.9.2 -> 0.10.0
* `swiftide-macros`: 0.9.2 -> 0.10.0
* `swiftide-integrations`: 0.9.2 -> 0.10.0
* `swiftide-query`: 0.9.2 -> 0.10.0

<details><summary><i><b>Changelog</b></i></summary><p>

## `swiftide`
<blockquote>

## [0.10.0](https://github.com/bosun-ai/swiftide/releases/tag/0.10.0) -
2024-09-06

BREAKING CHANGE: Indexing nodes now have their ID calculated using UUIDv3 via MD5 as the previous algorithm was unreliable and broke in 1.81. Added benefit that collision chance is even smaller. This means that when indexing again, nodes will have different IDs and upsert will not work. Backwards compatibility is non-trivial. If this is a huge issue, ping us on discord and we will look into it.

### Added

-
[57fe4aa](57fe4aa)
*(indexing)* Use UUIDv3 for indexing node ids
([#277](#277))

### Fixed

-
[5a724df](5a724df)
*(uncategorized)* Rust 1.81 support
([#275](#275))

### Other

-
[3711f6f](3711f6f)
*(readme)* Fix date
([#273](#273))


**Full Changelog**:
0.9.2...0.10.0
</blockquote>


</p></details>

---
This PR was generated with
[release-plz](https://github.com/MarcoIeni/release-plz/).

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Improved ID hashing on indexing nodes
1 participant