-
Notifications
You must be signed in to change notification settings - Fork 499
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
services/horizon: Add cache toggle and use libary for on-disk caching #5197
services/horizon: Add cache toggle and use libary for on-disk caching #5197
Conversation
7a0224f
to
669eec8
Compare
@@ -107,7 +107,7 @@ func (x *XdrStream) ExpectedHash() ([sha256.Size]byte, bool) { | |||
func (x *XdrStream) Close() error { | |||
if x.validateHash { | |||
// Read all remaining data from rdr | |||
_, err := io.Copy(ioutil.Discard, x.rdr) | |||
_, err := io.Copy(io.Discard, x.rdr) |
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.
oh, interesting, was this and ln 144 related to root cause of corruption seen in quickstart/557?
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.
nah this was just a drive-by fix of deprecated usage - they're functionally equivalent
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.
ok, how do we know this fixed stellar/quickstart#557, build quickstart locally with this branch for horizon and run with --pubnet
?
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.
yep, that's how I've been doing it this whole time locally and I can confirm that it no longer encounters the read error when processing ledgers
3e06e8e
to
e0c089e
Compare
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.
nice work!
…stellar#5197) * Add a `--history-archive-caching` flag (default=true) to toggle behavior * Refactor to use a library: fscache * Hook new metric into prometheus * Add parallel read test to stress cache * Add tests for deadlocking and other misc. scenarios
…stellar#5197) * Add a `--history-archive-caching` flag (default=true) to toggle behavior * Refactor to use a library: fscache * Hook new metric into prometheus * Add parallel read test to stress cache * Add tests for deadlocking and other misc. scenarios
…stellar#5197) * Add a `--history-archive-caching` flag (default=true) to toggle behavior * Refactor to use a library: fscache * Hook new metric into prometheus * Add parallel read test to stress cache * Add tests for deadlocking and other misc. scenarios
…stellar#5197) * Add a `--history-archive-caching` flag (default=true) to toggle behavior * Refactor to use a library: fscache * Hook new metric into prometheus * Add parallel read test to stress cache * Add tests for deadlocking and other misc. scenarios
What
fscache
) to avoid the issue we were seeing with the custom implementation.--history-archive-caching=(true|false)
flag (default: true) controls whether or not there will be an on-disk cache used for history archive fetches. Most people will not need to set this tofalse
unless they're encountering issues. This is to prevent folks from being blocked if issues are encountered with this feature in the future.Why
Battle-tested reliability.
Closes stellar/quickstart#557.
Closes #5186