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

bump index version #2237

Merged
merged 2 commits into from
Nov 6, 2023
Merged

bump index version #2237

merged 2 commits into from
Nov 6, 2023

Conversation

trinity-1686a
Copy link
Contributor

fix #2236

(allow version N-1 and version N, for the current version of tantivy.)

we already have some logic to allow older index revision, but it's an unnamed constant hidden somewhere. I moved it alongside the current version

@@ -103,7 +103,7 @@ impl Footer {
/// Has to be called after `extract_footer` to make sure it's not accessing uninitialised memory
pub fn is_compatible(&self) -> Result<(), Incompatibility> {
let library_version = crate::version();
if self.version.index_format_version < 4
Copy link
Collaborator

Choose a reason for hiding this comment

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

nitpick

const SUPPORTED_INDEX_FORMAT_VERSION_RANGE: Range<u32> = INDEX_FORMAT_OLDEST_SUPPORTED_VERSION..=INDEX_FORMAT_VERSION;

if !SUPPORTED_VERSION_RANGE.contains(&self.version.index_format_version) {
   // ... 
}

and add constant for lowest supported version
@trinity-1686a trinity-1686a force-pushed the trinity--bump-index-version branch from 22ca55e to 329e35e Compare November 6, 2023 15:56
@trinity-1686a trinity-1686a merged commit 7a0064d into main Nov 6, 2023
2 of 3 checks passed
@trinity-1686a trinity-1686a deleted the trinity--bump-index-version branch November 6, 2023 18:02
PSeitz pushed a commit that referenced this pull request Apr 10, 2024
* bump index version

and add constant for lowest supported version

* use range instead of handcoded bounds
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.

Bump the index format
2 participants