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

[Feat] OB Version #84

Merged
merged 2 commits into from
Oct 30, 2023
Merged

[Feat] OB Version #84

merged 2 commits into from
Oct 30, 2023

Conversation

IHEII
Copy link
Contributor

@IHEII IHEII commented Oct 25, 2023

Summary

Implement OB Version. Which is used to adapt to OB Server 4.x

Solution Description

Use AtomicU64 to represent the OB Server Version.

Comment on lines 42 to 47
pub fn calc_version(major: i32, minor: i16, major_patch: i8, minor_patch: i8) -> u64 {
((major as u64) << OB_VSN_MAJOR_SHIFT)
+ ((minor as u64) << OB_VSN_MINOR_SHIFT)
+ ((major_patch as u64) << OB_VSN_MAJOR_PATCH_SHIFT)
+ ((minor_patch as u64) << OB_VSN_MINOR_PATCH_SHIFT)
}

Choose a reason for hiding this comment

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

It seems we can use '|' to replace '+' 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.

Fixed

@IHEII IHEII merged commit 5adbe29 into oceanbase:main Oct 30, 2023
3 checks passed
@IHEII IHEII deleted the obVersion branch October 30, 2023 06:31
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.

2 participants