Skip to content

Commit a2ef3db

Browse files
authored
fix: memiavl WriteSnapshotWithContext cancel using wrong ctx (#7)
* fix:memiavl WriteSnapshotWithContext cancel * fix lint * add changelog
1 parent 13b99ec commit a2ef3db

File tree

3 files changed

+386
-2
lines changed

3 files changed

+386
-2
lines changed

CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
- [#1](https://github.com/crypto-org-chain/cronos-store/pull/1) feature: add store, memiavl, versiondb.
22
- [#3](https://github.com/crypto-org-chain/cronos-store/pull/3) feat(memiavl): MultiTree add chainId.
3-
- [#4](https://github.com/crypto-org-chain/cronos-store/pull/4) feat(versiondb/client): add dump versiondb changeset cmd.
3+
- [#4](https://github.com/crypto-org-chain/cronos-store/pull/4) feat(versiondb/client): add dump versiondb changeset cmd.
4+
- [#7](https://github.com/crypto-org-chain/cronos-store/pull/7) fix: memiavl WriteSnapshotWithContext cancel using wrong ctx.

memiavl/multitree.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -378,7 +378,8 @@ func (t *MultiTree) WriteSnapshotWithContext(ctx context.Context, dir string, wp
378378
}
379379

380380
// write the snapshots in parallel and wait all jobs done
381-
group, _ := wp.GroupContext(context.Background())
381+
// group, _ := wp.GroupContext(context.Background())
382+
group, _ := wp.GroupContext(ctx)
382383

383384
for _, entry := range t.trees {
384385
tree, name := entry.Tree, entry.Name

0 commit comments

Comments
 (0)