-
Notifications
You must be signed in to change notification settings - Fork 170
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
i1824 guava cache wraps OOM error which is then considered NonFatal and leads to validation error #1825
Conversation
…vent-oom-from-invalidating-blocks
.build[String, BlockSection] | ||
private val blockSectionsCache = | ||
Caffeine.newBuilder() | ||
.maximumSize(config.history.headersCacheSize) |
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.
why headersCacheSize here ? Looks like a mistake.
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.
Uff, I misread the lines
.build[ByteArrayWrapper, Array[Byte]] | ||
private val indexCache = | ||
Caffeine.newBuilder() | ||
.maximumSize(config.history.headersCacheSize) |
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, why headersCacheSize ?
Closes #1824
The problem is that Guava cache
org.ergoplatform.nodeView.history.storage.HistoryStorage#headersCache
and friends wrap OOM Error into uncheckedExecutionError
like thiscom.google.common.util.concurrent.ExecutionError: java.lang.OutOfMemoryError: Java heap space
and it is then consideredNonFatal
=> if it happens during modifier processing it can trigger Validation Error and modifiers get invalidated 🤦