risingwave icon indicating copy to clipboard operation
risingwave copied to clipboard

feat(expr): an expr impl(maybe only function call) back compatibility mechanism.

Open KeXiangWang opened this issue 1 year ago • 3 comments

Is your feature request related to a problem? Please describe.

Currently, we use function call signature to identify a function call based on the persisted proto files. When we have a new implementation on a function call, if the new impl does not changed it signature, the new function call will be triggered with old proto files.

One example, assume we have a function f(a int) -> int. The old implementation was f(a) = a + 1. After a fix/change, the new implementation is f(a) = a + 2. The same input will produce different output before and after the fix, which cause potential inconsistent state.

Now, when we have a fix on function calls, we need to tag the PR as a break change, which means users should recreate the MV containing the function call after cluster upgradation. But this a loose constraint. The user may not realize that and will not recreate and ask our engineer to fix the caused inconsistency.

So we need to find a way to provide back compatibility mechanism for expression or function calls fixes.

Describe the solution you'd like

Maybe add a version field in the function macro and it works like the existing AggVersion. Will provide a detailed design later.

Describe alternatives you've considered

No response

Additional context

No response

KeXiangWang avatar Jan 19 '24 05:01 KeXiangWang

Just FYI: It should be noted that a breaking change on the expression can be introduced accidentally by developers, e.g., a bug. So I guess any mechanism that let the developer to bump the version field manually is unsound. On the contrary, always recording a (release) version may help.

See also https://github.com/risingwavelabs/risingwave/pull/14221#pullrequestreview-1796703852.

BugenZhao avatar Jan 22 '24 02:01 BugenZhao

always recording a (release) version may help.

Yeah. Make sense. 👍

KeXiangWang avatar Jan 22 '24 02:01 KeXiangWang

This issue has been open for 60 days with no activity. Could you please update the status? Feel free to continue discussion or close as not planned.

github-actions[bot] avatar Mar 25 '24 01:03 github-actions[bot]

This issue has been open for 60 days with no activity.

If you think it is still relevant today, and needs to be done in the near future, you can comment to update the status, or just manually remove the no-issue-activity label.

You can also confidently close this issue as not planned to keep our backlog clean. Don't worry if you think the issue is still valuable to continue in the future. It's searchable and can be reopened when it's time. 😄

github-actions[bot] avatar Aug 01 '24 02:08 github-actions[bot]