Skip to content

Commit

Permalink
Merge branch 'aptos-release-v1.8' into jpark/release-yaml-v1-8-branch
Browse files Browse the repository at this point in the history
  • Loading branch information
junkil-park authored Oct 27, 2023
2 parents e1efcba + 1455e0a commit 95e5152
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 8 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/docker-build-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ jobs:
with:
GIT_SHA: ${{ needs.determine-docker-build-metadata.outputs.gitSha }}
FORGE_TEST_SUITE: compat
IMAGE_TAG: aptos-node-v1.6.2 # test against a previous testnet release
IMAGE_TAG: aptos-node-v1.7.3 # test against a previous testnet release
FORGE_RUNNER_DURATION_SECS: 300
COMMENT_HEADER: forge-compat
FORGE_NAMESPACE: forge-compat-${{ needs.determine-docker-build-metadata.outputs.targetCacheId }}
Expand Down Expand Up @@ -327,7 +327,7 @@ jobs:
with:
GIT_SHA: ${{ needs.determine-docker-build-metadata.outputs.gitSha }}
FORGE_TEST_SUITE: framework_upgrade
IMAGE_TAG: aptos-node-v1.5.1 # This workflow will test the upgradability from the current tip of the release branch to the current main branch.
IMAGE_TAG: aptos-node-v1.7.3 # This workflow will test the upgradability from the current tip of the release branch to the current main branch.
FORGE_RUNNER_DURATION_SECS: 300
COMMENT_HEADER: forge-framework-upgrade
FORGE_NAMESPACE: forge-framework-upgrade-${{ needs.determine-docker-build-metadata.outputs.targetCacheId }}
Expand Down
23 changes: 17 additions & 6 deletions storage/aptosdb/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1032,10 +1032,10 @@ impl AptosDB {
.with_label_values(&["commit_transactions"])
.start_timer();
let chunk_size = 512;
txns_to_commit
let batches = txns_to_commit
.par_chunks(chunk_size)
.enumerate()
.try_for_each(|(chunk_index, txns_in_chunk)| -> Result<()> {
.map(|(chunk_index, txns_in_chunk)| -> Result<SchemaBatch> {
let batch = SchemaBatch::new();
let chunk_first_version = first_version + (chunk_size * chunk_index) as u64;
txns_in_chunk.iter().enumerate().try_for_each(
Expand All @@ -1050,11 +1050,22 @@ impl AptosDB {
Ok(())
},
)?;
let _timer = OTHER_TIMERS_SECONDS
.with_label_values(&["commit_transactions___commit"])
.start_timer();
self.ledger_db.transaction_db().write_schemas(batch)
Ok(batch)
})
.collect::<Result<Vec<_>>>()?;

// Commit batches one by one for now because committing them in parallel will cause gaps. Although
// it might be acceptable because we are writing the progress, we want to play on the safer
// side unless this really becomes the bottleneck on production.
{
let _timer = OTHER_TIMERS_SECONDS
.with_label_values(&["commit_transactions___commit"])
.start_timer();

batches
.into_iter()
.try_for_each(|batch| self.ledger_db.transaction_db().write_schemas(batch))
}
}

fn commit_transaction_accumulator(
Expand Down

0 comments on commit 95e5152

Please sign in to comment.