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

Re-use deleted node IDs in incremental mode #56

Merged
merged 6 commits into from
Jan 15, 2024
Merged

Re-use deleted node IDs in incremental mode #56

merged 6 commits into from
Jan 15, 2024

Conversation

irevoire
Copy link
Member

@irevoire irevoire commented Jan 11, 2024

Pull Request

To avoid complexifying the tmp_nodes stuff even more, I made the choice not to re-use the IDs freed during an indexing process, but to only re-use the IDs freed between different indexing processes.

Related issue

Fixes #51

What does this PR do?

  • Add the capability to the concurrent nodeIDss to re-use available IDs without any mutexes or synchronizing anything

@irevoire irevoire added enhancement New feature or request indexing Everything related to indexing labels Jan 11, 2024
@irevoire irevoire marked this pull request as ready for review January 11, 2024 16:28
Copy link
Member

@Kerollmops Kerollmops left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we fix the length comparison to zero warning, please? By using !is_empty().

src/parallel.rs Outdated Show resolved Hide resolved
src/parallel.rs Outdated Show resolved Hide resolved
src/parallel.rs Outdated Show resolved Hide resolved
src/writer.rs Outdated Show resolved Hide resolved
src/writer.rs Outdated Show resolved Hide resolved
src/writer.rs Outdated Show resolved Hide resolved
src/writer.rs Outdated Show resolved Hide resolved
src/writer.rs Outdated Show resolved Hide resolved
src/writer.rs Outdated Show resolved Hide resolved
@irevoire irevoire changed the title Re use ids Re-use deleted node IDs in incremental mode Jan 15, 2024
Copy link
Member

@Kerollmops Kerollmops left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is much better with this AtomicBool/AtomicU32 method!

@Kerollmops Kerollmops merged commit 5e23882 into main Jan 15, 2024
7 checks passed
@Kerollmops Kerollmops deleted the re-use-ids branch January 15, 2024 15:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request indexing Everything related to indexing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Re-use IDs
2 participants