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

Private data optimization: purge transient store in background #1411

Conversation

cendhu
Copy link
Contributor

@cendhu cendhu commented Jun 16, 2020

Type of change

  • Improvement (improvement to code, performance, etc)

Description

By purging entries present in the transient store in the background, we can improve the overall throughput of private data collection by 22%

Related issues

sub-task https://jira.hyperledger.org/browse/FAB-17986
story https://jira.hyperledger.org/browse/FAB-17984

@cendhu cendhu requested a review from a team as a code owner June 16, 2020 18:15
Comment on lines 1186 to 1179
assertPurged("tx1", "tx2")
assert.NoError(t, err)
assertCommitHappened()
purgedTxns = []string{"tx1", "tx2"}
require.Eventually(t, assertPurgedTxns, 2*time.Second, 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.

I find this change reducing the readability by isolating the parameters from the function. I feel that a better change would be func() bool { return assertPurgedTxns("tx1", "tx2") } (as you have done for the other function below).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Agree. I was struggling but your suggestion didn't strike my mind.
func() bool { return assertPurgedTxns("tx1", "tx2") } simplifies everything.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

Comment on lines 1729 to 1717
assertPurged(false)
purged = false
require.Eventually(t, assertPurged, 2*time.Second, 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.

same comment as above

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

Signed-off-by: senthil <cendhu@gmail.com>
@cendhu cendhu force-pushed the private-optimization-bg-purge-transient branch from d462737 to 3075de9 Compare June 17, 2020 06:56
@manish-sethi manish-sethi merged commit a5411a1 into hyperledger:master Jun 17, 2020
@cendhu cendhu deleted the private-optimization-bg-purge-transient branch June 19, 2020 13:01
sijocherian pushed a commit to sijocherian/fabric that referenced this pull request Jun 28, 2020
Signed-off-by: senthil <cendhu@gmail.com>
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