-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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(rf1): Store index ref in metastore #13613
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
package wal | ||
|
||
type DataRef uint64 | ||
|
||
func NewDataRef(offset, size uint64) DataRef { | ||
return DataRef(offset<<32 | size) | ||
} | ||
|
||
func (b DataRef) Unpack() (int, int) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Whats the reason to pack these values? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. None really, we could use 2 int64 or 2 int32. The code was just available and I copy pasted. Do you prefer to change it ? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If we're using it elsewhere then I'm happy to continue using it. If this is the first usage I'm less inclined to introduce this as a way of storing multiple values unless there is a good reason (maybe due to perf, storage concerns etc.) |
||
offset := int(b >> 32) | ||
size := int((b << 32) >> 32) | ||
return offset, size | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this file can be removed now