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

[FAB-17800] Reset/Rollback returns error if a channel was bootstrapped from a snapshot #1990

Merged
merged 1 commit into from
Oct 13, 2020

Conversation

wenjianqiao
Copy link
Contributor

Signed-off-by: Wenjian Qiao wenjianq@gmail.com

Type of change

  • New feature

Description

  • For rollback, return an error if the specified channel was bootstrapped from a snapshot
  • For reset, return an error if any channel was bootstrapped from a snapshot

Additional details

Related issues

https://jira.hyperledger.org/browse/FAB-17800

@wenjianqiao wenjianqiao requested a review from a team as a code owner October 8, 2020 13:38
@wenjianqiao
Copy link
Contributor Author

/ci-run

@github-actions
Copy link

github-actions bot commented Oct 8, 2020

AZP build triggered!

common/ledger/blkstorage/snapshot_test.go Outdated Show resolved Hide resolved
require.NoError(t, err)
return len(requests) == 0
}
require.Eventually(t, snapshotGenerated, time.Minute, 100*time.Millisecond)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

100ms seem unnecessarily long to me...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The sample ledger has 9 blocks. When running UT locally, there were the following timestamps, so the elapsed time was 337-202=135ms.

2020-10-09 16:21:59.202 EDT [kvledger] func2 -> INFO 1dd^[[0m Generating snapshot channelID=testLedgerFromSnapshot lastCommittedBlockNumber=8

2020-10-09 16:21:59.337 EDT [kvledger] func2 -> INFO 200^[[0m Generated snapshot channelID=testLedgerFromSnapshot lastCommittedBlockNumber=8

core/ledger/kvledger/tests/reset_test.go Show resolved Hide resolved
…d from a snapshot

Signed-off-by: Wenjian Qiao <wenjianq@gmail.com>
@wenjianqiao
Copy link
Contributor Author

/ci-run

@github-actions
Copy link

AZP build triggered!

@wenjianqiao
Copy link
Contributor Author

/ci-run

@github-actions
Copy link

AZP build triggered!

1 similar comment
@github-actions
Copy link

AZP build triggered!

@wenjianqiao
Copy link
Contributor Author

/ci-run

@github-actions
Copy link

AZP build triggered!

require.NoError(t, os.MkdirAll(ledgerChainDir, 0755))
file, err := os.Create(filepath.Join(ledgerChainDir, bootstrappingSnapshotInfoFile))
require.NoError(t, err)
defer file.Close()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

better to remove "defer"

@manish-sethi
Copy link
Contributor

This PR seems stuck in the docs build but otherwise there is no docs related changes.

@manish-sethi manish-sethi merged commit 192b03b into hyperledger:master Oct 13, 2020
@wenjianqiao wenjianqiao deleted the resetrollback branch October 28, 2020 18:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants