Skip to content

Commit

Permalink
node: add --query-threads option, disable linux/arm64 build
Browse files Browse the repository at this point in the history
  • Loading branch information
eldargab committed Feb 7, 2025
1 parent c3b9e96 commit d6a1c50
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/docker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
uses: docker/build-push-action@v6
with:
context: .
platforms: linux/amd64, linux/arm64
platforms: linux/amd64
push: true
target: ${{ inputs.target }}
tags: subsquid/data-${{ inputs.target }}:${{ inputs.tag }}
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions crates/node-example/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ futures = { workspace = true }
serde = { workspace = true, features = ["derive"] }
serde_json = { workspace = true }
sqd-node = { path = "../node" }
sqd-polars = { path = "../polars" }
sqd-storage = { path = "../storage" }
tikv-jemallocator = "0.6.0"
tokio = { workspace = true, features = ["full"] }
Expand Down
6 changes: 5 additions & 1 deletion crates/node-example/src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,11 @@ pub struct CLI {
pub database_dir: String,

#[arg(long, value_name = "MB", default_value = "4096")]
pub data_cache_size: usize
pub data_cache_size: usize,

/// Max number of threads to use for query execution
#[arg(long)]
pub query_threads: Option<usize>
}


Expand Down
6 changes: 6 additions & 0 deletions crates/node-example/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,12 @@ static GLOBAL: tikv_jemallocator::Jemalloc = tikv_jemallocator::Jemalloc;

fn main() -> anyhow::Result<()> {
let args = CLI::parse();

if let Some(n_threads) = args.query_threads {
unsafe {
sqd_polars::set_polars_thread_pool_size(n_threads);
}
}

let env_filter = tracing_subscriber::EnvFilter::builder().parse_lossy(
std::env::var(tracing_subscriber::EnvFilter::DEFAULT_ENV)
Expand Down

0 comments on commit d6a1c50

Please sign in to comment.