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

Rename fast field precision parameter to fast_precision #3946

Closed
guilload opened this issue Oct 12, 2023 · 2 comments · Fixed by #3952
Closed

Rename fast field precision parameter to fast_precision #3946

guilload opened this issue Oct 12, 2023 · 2 comments · Fixed by #3952
Assignees
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@guilload
Copy link
Member

There is some confusion between the stored precision, which is always in nanoseconds, vs. the fast field precision which is configurable. The current naming scheme does not help.

Let's rename the fast field precision parameter to fast_precision. We can do so in a backward-compatible manner. The fix should also update the docs and the configuration examples in config/ and other places (rg for precision: sec|mil|mic|nan).

See discussion in #3940.

@guilload guilload added enhancement New feature or request good first issue Good for newcomers labels Oct 12, 2023
@Harsh1s
Copy link
Contributor

Harsh1s commented Oct 12, 2023

There is some confusion between the stored precision, which is always in nanoseconds, vs. the fast field precision which is configurable. The current naming scheme does not help.

Let's rename the fast field precision parameter to fast_precision. We can do so in a backward-compatible manner. The fix should also update the docs and the configuration examples in config/ and other places (rg for precision: sec|mil|mic|nan).

See discussion in #3940.

Hello there, I am kind of new to Rust and trying explore good first issues to get myself acquainted with it. I stumbled upon this issue and quickwit caught my eye. I want to try and solve this issue but am confused about something. Here are the steps that I figured I'll have to do:

1.Update the Mapping File: Modify the index configuration mapping file, replacing the occurrence of precision with fast_precision.
2.Update Code References: Wherever code references the precision field, update it to use fast_precision instead.
3.Documentation: Update documentation to reflect the change from precision to fast_precision.

Now forgive me if I sound stupid but should this be enough or is there something specific I'll have to do for the backward compatibility? That is the part that confuses me, what exactly is needed to be done to ensure backward compatibility?

@guilload
Copy link
Member Author

Hello @Harsh1s,

Yes, for preserving backward compatibility, we need to add a serde alias attribute on the renamed fast_precision field, so it also deserializes old index configs successfully. This is unit-testable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
No open projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants