-
Notifications
You must be signed in to change notification settings - Fork 507
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
Added support for fromBlock when generating eventservice cache keys #184
Added support for fromBlock when generating eventservice cache keys #184
Conversation
…event service cache keys Signed-off-by: Jim Zhang <[email protected]>
Codecov Report
@@ Coverage Diff @@
## main #184 +/- ##
==========================================
+ Coverage 76.15% 76.21% +0.06%
==========================================
Files 193 193
Lines 14077 14098 +21
==========================================
+ Hits 10720 10745 +25
+ Misses 2388 2385 -3
+ Partials 969 968 -1
Continue to review full report at Codecov.
|
Hey @jimthematrix, are you going to continue working on this PR (fix tests, code coverage)? I've stumbled on this issue as well and would like to help if this PR is stale. |
@kopaygorodsky thanks for offering to help, I haven't been able to get back to this one. if you are able to spare some cycles on the tests that'd be much appreciated! |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Signed-off-by: Jim Zhang <[email protected]>
e59c782
to
92bc40a
Compare
Signed-off-by: Jim Zhang <[email protected]>
ec18302
to
31fb7c4
Compare
Signed-off-by: Jim Zhang <[email protected]>
Signed-off-by: Jim Zhang <[email protected]>
Signed-off-by: Jim Zhang <[email protected]>
@bstasyszyn hey, this PR raised a problem related to the lazycache component. Each event client with a different starting block number is a new entry in the cache. It has some idling timeout and then calls finalizer which closes the connection and resets Ref to nil, but the key in the cache stays. One of my environments has very often reconnections with increasing block number param each time so in a week it resulted in 200Mb of keys in the cache.
|
The current cache key only takes into account the channel ID, which means if I have a different
fromBlock
number, or chaincode Id with a subsequentRegisterBlockEvent()
call, it would not take effect because the previous event service will be returned from the cache lookup.