-
Notifications
You must be signed in to change notification settings - Fork 8.9k
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
Private data optimization: purge transient store in background #1411
Conversation
gossip/privdata/coordinator_test.go
Outdated
assertPurged("tx1", "tx2") | ||
assert.NoError(t, err) | ||
assertCommitHappened() | ||
purgedTxns = []string{"tx1", "tx2"} | ||
require.Eventually(t, assertPurgedTxns, 2*time.Second, 100*time.Millisecond) |
There was a problem hiding this comment.
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).
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
gossip/privdata/coordinator_test.go
Outdated
assertPurged(false) | ||
purged = false | ||
require.Eventually(t, assertPurged, 2*time.Second, 100*time.Millisecond) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same comment as above
There was a problem hiding this comment.
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>
d462737
to
3075de9
Compare
Signed-off-by: senthil <cendhu@gmail.com>
Type of change
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