Skip to content

Commit 710c087

Browse files
committed
add manifest
1 parent 4aa0602 commit 710c087

File tree

4 files changed

+34
-2
lines changed

4 files changed

+34
-2
lines changed

.github/workflows/metric-engine-ci.yml

+5-2
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ on:
2828
- 'horaedb/**'
2929
pull_request:
3030
paths:
31-
- 'src/**'
3231
- 'horaedb/**'
3332

3433
# Common environment variables
@@ -45,7 +44,7 @@ jobs:
4544
runs-on: ubuntu-latest
4645
timeout-minutes: 60
4746
steps:
48-
- uses: actions/checkout@v3
47+
- uses: actions/checkout@v4
4948
with:
5049
submodules: true
5150
- run: |
@@ -63,3 +62,7 @@ jobs:
6362
working-directory: horaedb
6463
run: |
6564
make fmt sort clippy
65+
- name: Check lock
66+
working-directory: horaedb
67+
run: |
68+
git diff --exit-code

horaedb/metric_engine/src/lib.rs

+1
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
//! Storage Engine for metrics.
1919
2020
pub mod error;
21+
mod manifest;
2122
mod sst;
2223
pub mod storage;
2324
pub mod types;

horaedb/metric_engine/src/manifest.rs

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
// Licensed to the Apache Software Foundation (ASF) under one
2+
// or more contributor license agreements. See the NOTICE file
3+
// distributed with this work for additional information
4+
// regarding copyright ownership. The ASF licenses this file
5+
// to you under the Apache License, Version 2.0 (the
6+
// "License"); you may not use this file except in compliance
7+
// with the License. You may obtain a copy of the License at
8+
//
9+
// http://www.apache.org/licenses/LICENSE-2.0
10+
//
11+
// Unless required by applicable law or agreed to in writing,
12+
// software distributed under the License is distributed on an
13+
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14+
// KIND, either express or implied. See the License for the
15+
// specific language governing permissions and limitations
16+
// under the License.
17+
18+
pub struct Manifest {}
19+
20+
impl Manifest {
21+
pub fn new(id: u64) -> Self {
22+
// Recover the manifest using the id from storage.
23+
Self {}
24+
}
25+
}

horaedb/metric_engine/src/storage.rs

+3
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ use arrow::{array::RecordBatch, datatypes::Schema};
1919
use async_trait::async_trait;
2020

2121
use crate::{
22+
manifest::Manifest,
2223
sst::SSTable,
2324
types::{ObjectStoreRef, Predicate, TimeRange},
2425
Result,
@@ -46,6 +47,7 @@ pub struct CloudObjectStorage {
4647
id: u64,
4748
store: ObjectStoreRef,
4849
sstables: Vec<SSTable>,
50+
manifest: Manifest,
4951
}
5052

5153
impl CloudObjectStorage {
@@ -55,6 +57,7 @@ impl CloudObjectStorage {
5557
id,
5658
store,
5759
sstables: Vec::new(),
60+
manifest: Manifest::new(id),
5861
}
5962
}
6063
}

0 commit comments

Comments
 (0)