Skip to content
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

ZIL-5446: Fix txn import issues #246

Merged
merged 1 commit into from
Oct 25, 2023
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
2 changes: 1 addition & 1 deletion products/pdt/cd/base/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ data:
NETWORK_TYPE_TESTNET: "testnet"
NETWORK_TYPE_MAINNET: "mainnet"
NETWORK_TESTNET: "testnet-v925"
NETWORK_MAINNET: "mainnet-v901"
NETWORK_MAINNET: "mainnet-v920"
DOWNLOAD_DIR: "/data/download"
UNPACK_DIR: "/data/download"
NR_THREADS: "1"
Expand Down
4 changes: 2 additions & 2 deletions products/pdt/cd/overlays/staging/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ data:
NETWORK_TYPE_TESTNET: "testnet"
NETWORK_TYPE_MAINNET: "mainnet"
NETWORK_TESTNET: "testnet-v925"
NETWORK_MAINNET: "mainnet-v901"
NETWORK_MAINNET: "mainnet-v920"
DOWNLOAD_DIR: "/data/download"
UNPACK_DIR: "/data/download"
NR_THREADS: "1"
BATCH_BLOCKS: "1000"
BATCH_BLOCKS: "10000"
18 changes: 11 additions & 7 deletions products/pdt/pdt/src/bqimport.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,17 @@ pub async fn bq_multi_import(

jobs.spawn(async move {
println!("Sync persistence to {:?}", &my_unpack_dir);
let unpack_str = my_unpack_dir
.to_str()
.ok_or(anyhow!("Cannot render thread-specific data dir"))?;
// Sync persistence
if duplicate_persistence {
pdtlib::utils::dup_directory(&orig_unpack_dir, &unpack_str)?;
}
let unpack_str = if nr_threads > 1 {
let new_unpack_dir = my_unpack_dir
.to_str()
.ok_or(anyhow!("Cannot render thread-specific data dir"))?;
// Sync persistence
pdtlib::utils::dup_directory(&orig_unpack_dir, &new_unpack_dir)?;
new_unpack_dir
} else {
&orig_unpack_dir
};

println!("Starting thread {}/{}", idx, nr_threads);
let exporter = Exporter::new(&unpack_str)?;
let mut imp = TransactionMicroblockImporter::new();
Expand Down
1 change: 0 additions & 1 deletion products/pdt/pdtlisten/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,6 @@ pub async fn listen_bq(bq_project_id: &str, bq_dataset_id: &str, api_url: &str)

println!("checking schemas..");
ZilliqaBQProject::ensure_schema(&loc).await?;
// ZilliqaPSQLProject::ensure_schema(&p_client).await?;
println!("all good.");

let zilliqa_bq_proj = ZilliqaBQProject::new(
Expand Down