Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Install protoc
run: sudo apt-get update && sudo apt-get install -y protobuf-compiler
- name: Install system dependencies
run: sudo apt-get update && sudo apt-get install -y protobuf-compiler clang libclang-dev llvm-dev

- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
Expand Down
1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ members = [
"crates/scheduler",
"crates/cache",
"crates/tape",
"crates/node",
"crates/vtl",
]

Expand Down
8 changes: 6 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.PHONY: build build-debug fmt fmt-check clippy test unit test-unit vtl-unit vtl-check check check-all check-safe clean help install-hooks install-tools setup lint run-metadata run-gateway run-scheduler run-cache run-tape
.PHONY: build build-debug fmt fmt-check clippy test unit test-unit vtl-unit vtl-check check check-all check-safe clean help install-hooks install-tools setup lint run-metadata run-gateway run-scheduler run-cache run-tape run-node run-node-no-tape

.DEFAULT_GOAL := help

Expand Down Expand Up @@ -43,6 +43,10 @@ run-cache:
@cargo run -p coldstore-cache
run-tape:
@cargo run -p coldstore-tape
run-node:
@cargo run -p coldstore-node
run-node-no-tape:
@cargo run -p coldstore-node -- --config configs/single-node-no-tape.yaml

lint: fmt-check clippy check unit
@echo "All lint checks passed (unit-only)."
Expand All @@ -64,5 +68,5 @@ help:
@echo ""
@echo "Build: build build-debug clean"
@echo "Quality: fmt fmt-check clippy test unit vtl-unit vtl-check check check-all check-safe lint"
@echo "Run: run-metadata run-gateway run-scheduler run-cache run-tape"
@echo "Run: run-node run-node-no-tape run-metadata run-gateway run-scheduler run-cache run-tape"
@echo "Setup: setup install-tools install-hooks"
2 changes: 2 additions & 0 deletions configs/single-node-no-tape.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
data_dir: data/single-node-no-tape
tape_enabled: false
2 changes: 2 additions & 0 deletions configs/single-node.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
data_dir: data/single-node
tape_enabled: true
2 changes: 2 additions & 0 deletions crates/cache/src/backend.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ pub struct CacheXattrs {
pub size: u64,
pub expire_at: i64,
pub cached_at: i64,
pub last_access_at: i64,
pub access_count: u64,
pub checksum: Option<String>,
pub content_type: Option<String>,
pub etag: Option<String>,
Expand Down
6 changes: 6 additions & 0 deletions crates/cache/src/hdd.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ struct XattrsJson {
size: u64,
expire_at: i64,
cached_at: i64,
last_access_at: Option<i64>,
access_count: Option<u64>,
checksum: Option<String>,
content_type: Option<String>,
etag: Option<String>,
Expand All @@ -60,6 +62,8 @@ fn to_json(x: &CacheXattrs) -> XattrsJson {
size: x.size,
expire_at: x.expire_at,
cached_at: x.cached_at,
last_access_at: Some(x.last_access_at),
access_count: Some(x.access_count),
checksum: x.checksum.clone(),
content_type: x.content_type.clone(),
etag: x.etag.clone(),
Expand All @@ -78,6 +82,8 @@ fn from_json(j: &XattrsJson) -> CacheXattrs {
size: j.size,
expire_at: j.expire_at,
cached_at: j.cached_at,
last_access_at: j.last_access_at.unwrap_or(j.cached_at),
access_count: j.access_count.unwrap_or(0),
checksum: j.checksum.clone(),
content_type: j.content_type.clone(),
etag: j.etag.clone(),
Expand Down
1 change: 1 addition & 0 deletions crates/cache/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
pub mod backend;
pub mod hdd;
pub mod service;
pub mod spdk;

use anyhow::Result;
use coldstore_common::config::CacheConfig;
Expand Down
Loading
Loading