Skip to content

Commit

Permalink
ZIL-5446: Fix txn import issues (#246)
Browse files Browse the repository at this point in the history
  • Loading branch information
WuBruno authored Oct 25, 2023
1 parent 91068cf commit 56f8cbe
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 11 deletions.
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

0 comments on commit 56f8cbe

Please sign in to comment.