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

Writing a HOWTO migrate codec version #12930

Open
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

slow-J
Copy link
Contributor

@slow-J slow-J commented Dec 12, 2023

More detail in #12918.
Changing PFOR encoding to FOR for doc blocks in #12741, required bumping the codec version. The codec upgrade process has numerous moving parts and it required multiple follow-ups to add lost unit tests.

Hopefully the lessons learned from this codec version "bump" will help others for the next time, whenever that may be.

Starting this is a draft PR since I am not sure that I am using the correct Lucene terminology, best practices, style, language, etc.

Suggestions and edits welcome :D

Closes #12918.

* Create RW forks of the required `backwards_codecs` components (otherwise we cannot test writing to `backwards_codecs`) for use in
backwards compatibility unit tests (the ones moved to backward_codecs). Copy previous implementations of the RW classes and update with the
formats used in that specific codec. Use the RW components in test cases of relevant codecs.
* Create a new `test.org.apache.lucene.backward_codecs.luceneXXX` package and copy in unit tests for any forked codec components. Modify
Copy link
Contributor

Choose a reason for hiding this comment

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

Should this step of new java package creation moved up. Not sure.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I wanted the unit tests logically separated from the rest of the upgrade since it involves some unrelated changes. Where do you think it should go?

dev-docs/codec-version-bump-howto.md Outdated Show resolved Hide resolved
slow-J and others added 2 commits December 14, 2023 14:10
Co-authored-by: Shubham Chaudhary <36742242+shubhamvishu@users.noreply.github.com>
@slow-J slow-J marked this pull request as ready for review December 14, 2023 14:40
Copy link

This PR has not had activity in the past 2 weeks, labeling it as stale. If the PR is waiting for review, notify the dev@lucene.apache.org list. Thank you for your contribution!

@github-actions github-actions bot added the Stale label Jan 19, 2024

### Move original files to backwards_codecs
* Deprecate previous Codec:
* Create a new package for the previous codec of version XXX: `org.apache.lucene.backward_codecs.luceneXXX.LuceneXXXCodec`.
Copy link
Contributor

Choose a reason for hiding this comment

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

Are we creating a new package or you mean a new class eg: LuceneXXXCodec with old codec as specified here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sorry, I meant class, will change.


### Fork and modify files
* Creating a new Codec:
* Create a new package for your new codec of version XXX: `org.apache.lucene.codecs.luceneXXX`.
Copy link
Contributor

Choose a reason for hiding this comment

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

How about writing this how-to with the idea of changing the codec version from LuceneXY to LuceneXZ (?), that way I believe it'll be more clear to understand which codec is referenced in as opposed to writing LuceneXXX or saying old vs new. What do you think?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Great idea! Will do this now. Also sorry for the delay, this work fell off my radar. Picking it back up.

@github-actions github-actions bot removed the Stale label Jan 24, 2024
Copy link

github-actions bot commented Feb 8, 2024

This PR has not had activity in the past 2 weeks, labeling it as stale. If the PR is waiting for review, notify the dev@lucene.apache.org list. Thank you for your contribution!

@github-actions github-actions bot added the Stale label Feb 8, 2024
@github-actions github-actions bot removed the Stale label Feb 16, 2024
Copy link

github-actions bot commented Mar 6, 2024

This PR has not had activity in the past 2 weeks, labeling it as stale. If the PR is waiting for review, notify the dev@lucene.apache.org list. Thank you for your contribution!

@github-actions github-actions bot added the Stale label Mar 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Write a HOWTO migrate Codec format version
2 participants