-
Notifications
You must be signed in to change notification settings - Fork 203
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: init metric engine structure #1554
Conversation
7274ce8
to
8eb0fd0
Compare
b606aa4
to
3f46e6c
Compare
729c11c
to
fdf93d4
Compare
fdf93d4
to
4aa0602
Compare
af69a70
to
710c087
Compare
horaedb/metric_engine/src/storage.rs
Outdated
|
||
/// Time-aware merge storage interface. | ||
#[async_trait] | ||
pub trait TMStorage { |
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.
TM is confusing. How about writing as the full name TimeMergeStorage
?
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.
fixed
|
||
/// Time-aware merge storage interface. | ||
#[async_trait] | ||
pub trait TimeMergeStorage { |
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.
I think may be just define the xxxRequest
? And we fill it when we impl it.
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.
Good idea.
horaedb/metric_engine/src/storage.rs
Outdated
range: TimeRange, | ||
predicates: Vec<Predicate>, |
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.
Seems time range is a predicate.
And I think maybe we can just process the filter and projection by reusing realted fileds in old ReadRequest
?
It seems not sure, may just define a empty ScanRequest
in this sketch.
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.
Seems time range is a predicate.
TimeRange is special predicate, it must be included in every request.
And I think maybe we can just process the filter and projection by reusing realted fileds in old
ReadRequest
?
No code reuse for now.
It seems not sure, may just define a empty
ScanRequest
in this sketch.
The current one show basic usage, if we leave empty here, other dev have no idea what the query looks like.
pub struct Manifest {} | ||
|
||
impl Manifest { | ||
pub fn new(id: u64) -> Self { |
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.
The id means?
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.
UUID, it can be used to construct path for store it.
horaedb/metric_engine/src/sst.rs
Outdated
pub struct SSTable { | ||
pub sst_id: u64, | ||
pub storage: ObjectStoreRef, | ||
} |
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.
It seems storage should not be part of SSTable? The struct seems better to include the metadata(e.g. id, path)
Maybe we just define a empty struct in this sketch?
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.
OK, I will just leave an id
in it.
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.
LGTM
cba26dc
to
e665307
Compare
LGTM |
Rationale
See #1558
Detailed Changes
Add a new sub directory
horaedb
, all source codes for metric engine are under it.Test Plan
Add a new ci.